Showing
13 changed files
with
142 additions
and
7 deletions
... | @@ -8,7 +8,7 @@ android { | ... | @@ -8,7 +8,7 @@ android { |
8 | 8 | ||
9 | defaultConfig { | 9 | defaultConfig { |
10 | applicationId "warp.ly.android_sdk" | 10 | applicationId "warp.ly.android_sdk" |
11 | - minSdkVersion 23 | 11 | + minSdkVersion 31 |
12 | targetSdkVersion 34 | 12 | targetSdkVersion 34 |
13 | versionCode 100 | 13 | versionCode 100 |
14 | versionName "1.0.0" | 14 | versionName "1.0.0" | ... | ... |
... | @@ -5,7 +5,7 @@ android.buildFeatures.buildConfig = true | ... | @@ -5,7 +5,7 @@ android.buildFeatures.buildConfig = true |
5 | 5 | ||
6 | ext { | 6 | ext { |
7 | PUBLISH_GROUP_ID = 'ly.warp' | 7 | PUBLISH_GROUP_ID = 'ly.warp' |
8 | - PUBLISH_VERSION = '4.5.5.4m2' | 8 | + PUBLISH_VERSION = '4.5.5.4deh1' |
9 | PUBLISH_ARTIFACT_ID = 'warply-android-sdk' | 9 | PUBLISH_ARTIFACT_ID = 'warply-android-sdk' |
10 | } | 10 | } |
11 | 11 | ||
... | @@ -26,7 +26,7 @@ android { | ... | @@ -26,7 +26,7 @@ android { |
26 | } | 26 | } |
27 | 27 | ||
28 | defaultConfig { | 28 | defaultConfig { |
29 | - minSdkVersion 23 | 29 | + minSdkVersion 31 |
30 | targetSdkVersion 34 | 30 | targetSdkVersion 34 |
31 | consumerProguardFiles 'proguard-rules.pro' | 31 | consumerProguardFiles 'proguard-rules.pro' |
32 | vectorDrawables.useSupportLibrary = true | 32 | vectorDrawables.useSupportLibrary = true | ... | ... |
... | @@ -33,6 +33,12 @@ | ... | @@ -33,6 +33,12 @@ |
33 | android:theme="@style/SDKAppTheme" /> | 33 | android:theme="@style/SDKAppTheme" /> |
34 | 34 | ||
35 | <activity | 35 | <activity |
36 | + android:name=".activities.HomeActivity" | ||
37 | + android:exported="false" | ||
38 | + android:screenOrientation="portrait" | ||
39 | + android:theme="@style/SDKAppTheme" /> | ||
40 | + | ||
41 | + <activity | ||
36 | android:name=".dexter.PermissionsActivity" | 42 | android:name=".dexter.PermissionsActivity" |
37 | android:exported="false" | 43 | android:exported="false" |
38 | android:launchMode="singleInstance" | 44 | android:launchMode="singleInstance" | ... | ... |
1 | +package ly.warp.sdk.activities; | ||
2 | + | ||
3 | +import android.app.Activity; | ||
4 | +import android.os.Bundle; | ||
5 | +import android.view.View; | ||
6 | +import android.widget.ImageView; | ||
7 | + | ||
8 | +import ly.warp.sdk.R; | ||
9 | + | ||
10 | +public class HomeActivity extends Activity implements View.OnClickListener { | ||
11 | + // =========================================================== | ||
12 | + // Constants | ||
13 | + // =========================================================== | ||
14 | + | ||
15 | + // =========================================================== | ||
16 | + // Fields | ||
17 | + // =========================================================== | ||
18 | + private ImageView mIvBanner; | ||
19 | + | ||
20 | + // =========================================================== | ||
21 | + // Methods for/from SuperClass/Interfaces | ||
22 | + // =========================================================== | ||
23 | + | ||
24 | + @Override | ||
25 | + public void onCreate(Bundle savedInstanceState) { | ||
26 | + super.onCreate(savedInstanceState); | ||
27 | + setContentView(R.layout.activity_home); | ||
28 | + | ||
29 | + mIvBanner = findViewById(R.id.banner_icon); | ||
30 | + | ||
31 | + initViews(); | ||
32 | + } | ||
33 | + | ||
34 | + @Override | ||
35 | + public void onResume() { | ||
36 | + super.onResume(); | ||
37 | + } | ||
38 | + | ||
39 | + // =========================================================== | ||
40 | + // Methods | ||
41 | + // =========================================================== | ||
42 | + | ||
43 | + private void initViews() { | ||
44 | + mIvBanner.setOnClickListener(this); | ||
45 | + } | ||
46 | + | ||
47 | + @Override | ||
48 | + public void onClick(View v) { | ||
49 | + if (v.getId() == R.id.banner_icon) { | ||
50 | + | ||
51 | + } | ||
52 | + } | ||
53 | + | ||
54 | + // =========================================================== | ||
55 | + // Inner and Anonymous Classes | ||
56 | + // =========================================================== | ||
57 | +} |
1 | package ly.warp.sdk.fragments; | 1 | package ly.warp.sdk.fragments; |
2 | 2 | ||
3 | +import android.content.Intent; | ||
3 | import android.os.Bundle; | 4 | import android.os.Bundle; |
4 | import android.view.LayoutInflater; | 5 | import android.view.LayoutInflater; |
5 | import android.view.View; | 6 | import android.view.View; |
... | @@ -20,6 +21,7 @@ import org.json.JSONObject; | ... | @@ -20,6 +21,7 @@ import org.json.JSONObject; |
20 | import java.util.ArrayList; | 21 | import java.util.ArrayList; |
21 | 22 | ||
22 | import ly.warp.sdk.R; | 23 | import ly.warp.sdk.R; |
24 | +import ly.warp.sdk.activities.HomeActivity; | ||
23 | import ly.warp.sdk.db.WarplyDBHelper; | 25 | import ly.warp.sdk.db.WarplyDBHelper; |
24 | import ly.warp.sdk.io.callbacks.CallbackReceiver; | 26 | import ly.warp.sdk.io.callbacks.CallbackReceiver; |
25 | import ly.warp.sdk.io.models.Campaign; | 27 | import ly.warp.sdk.io.models.Campaign; |
... | @@ -113,8 +115,11 @@ public class HomeFragment extends Fragment implements View.OnClickListener, Swip | ... | @@ -113,8 +115,11 @@ public class HomeFragment extends Fragment implements View.OnClickListener, Swip |
113 | if (view.getId() == R.id.ll_auth_login) { | 115 | if (view.getId() == R.id.ll_auth_login) { |
114 | //6012049321, 6012049322, 6012049323, 7000000831 history, 7000000826, 7000000831 shared coupons | 116 | //6012049321, 6012049322, 6012049323, 7000000831 history, 7000000826, 7000000831 shared coupons |
115 | //prod 6006552990, prod 6005892749, live 3000184910,prod 7000070282, live 3000136179 | 117 | //prod 6006552990, prod 6005892749, live 3000184910,prod 7000070282, live 3000136179 |
116 | - mPbLoading.setVisibility(View.VISIBLE); | 118 | +// mPbLoading.setVisibility(View.VISIBLE); |
117 | - WarplyManager.getCosmoteUser(mEtGuid.getText().toString(), mLoginReceiver); | 119 | +// WarplyManager.getCosmoteUser(mEtGuid.getText().toString(), mLoginReceiver); |
120 | + | ||
121 | + Intent myIntent = new Intent(getContext(), HomeActivity.class); | ||
122 | + startActivity(myIntent); | ||
118 | return; | 123 | return; |
119 | } | 124 | } |
120 | if (view.getId() == R.id.ll_auth_logout) { | 125 | if (view.getId() == R.id.ll_auth_logout) { | ... | ... |
... | @@ -19,7 +19,7 @@ public class WarplyProvider extends ContentProvider { | ... | @@ -19,7 +19,7 @@ public class WarplyProvider extends ContentProvider { |
19 | 19 | ||
20 | @Override | 20 | @Override |
21 | public boolean onCreate() { | 21 | public boolean onCreate() { |
22 | -// AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO); | 22 | + AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO); |
23 | 23 | ||
24 | // Initialize the database helper | 24 | // Initialize the database helper |
25 | Context context = getContext(); | 25 | Context context = getContext(); | ... | ... |

887 Bytes

931 Bytes

253 KB

2.29 KB
1 | +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
2 | + android:layout_width="match_parent" | ||
3 | + android:layout_height="match_parent" | ||
4 | + android:background="@color/cos_grey_light"> | ||
5 | + | ||
6 | + <androidx.core.widget.NestedScrollView | ||
7 | + android:id="@+id/home_scrollview" | ||
8 | + android:layout_width="match_parent" | ||
9 | + android:layout_height="match_parent" | ||
10 | + android:fillViewport="true"> | ||
11 | + | ||
12 | + <LinearLayout | ||
13 | + android:id="@+id/home_content_container" | ||
14 | + android:layout_width="match_parent" | ||
15 | + android:layout_height="wrap_content" | ||
16 | + android:orientation="vertical"> | ||
17 | + | ||
18 | + <LinearLayout | ||
19 | + android:id="@+id/header_layout" | ||
20 | + android:layout_width="match_parent" | ||
21 | + android:layout_height="wrap_content" | ||
22 | + android:layout_gravity="center" | ||
23 | + android:background="@color/cos_grey_light" | ||
24 | + android:orientation="horizontal" | ||
25 | + android:padding="16dp"> | ||
26 | + | ||
27 | + <LinearLayout | ||
28 | + android:layout_width="0dp" | ||
29 | + android:layout_height="wrap_content" | ||
30 | + android:layout_gravity="center" | ||
31 | + android:layout_weight="1" | ||
32 | + android:orientation="horizontal"> | ||
33 | + | ||
34 | + <ImageView | ||
35 | + android:id="@+id/green_icon" | ||
36 | + android:layout_width="52dp" | ||
37 | + android:layout_height="20dp" | ||
38 | + android:layout_marginEnd="8dp" | ||
39 | + android:src="@drawable/demo_green" /> | ||
40 | + | ||
41 | + <ImageView | ||
42 | + android:id="@+id/family_icon" | ||
43 | + android:layout_width="52dp" | ||
44 | + android:layout_height="20dp" | ||
45 | + android:src="@drawable/demo_family" /> | ||
46 | + </LinearLayout> | ||
47 | + | ||
48 | + <ImageView | ||
49 | + android:id="@+id/profile_icon" | ||
50 | + android:layout_width="40dp" | ||
51 | + android:layout_height="40dp" | ||
52 | + android:layout_gravity="center_vertical|end" | ||
53 | + android:src="@drawable/demo_profile" /> | ||
54 | + </LinearLayout> | ||
55 | + | ||
56 | + <ImageView | ||
57 | + android:id="@+id/banner_icon" | ||
58 | + android:layout_width="match_parent" | ||
59 | + android:layout_height="320dp" | ||
60 | + android:scaleType="fitXY" | ||
61 | + android:src="@drawable/demo_home_banner" /> | ||
62 | + | ||
63 | + </LinearLayout> | ||
64 | + </androidx.core.widget.NestedScrollView> | ||
65 | +</RelativeLayout> |
... | @@ -3,8 +3,10 @@ | ... | @@ -3,8 +3,10 @@ |
3 | <!-- Used in drawables --> | 3 | <!-- Used in drawables --> |
4 | <color name="cos_cyan">#A3F2DA</color> | 4 | <color name="cos_cyan">#A3F2DA</color> |
5 | <color name="cos_grey_dark">#787878</color> | 5 | <color name="cos_grey_dark">#787878</color> |
6 | + <color name="cos_grey_light">#F2F2F2</color> | ||
6 | <color name="cos_green12">#0EA600</color> | 7 | <color name="cos_green12">#0EA600</color> |
7 | <color name="cos_green6_tr">#660EA600</color> | 8 | <color name="cos_green6_tr">#660EA600</color> |
9 | + <color name="cos_orange">#FF9933</color> | ||
8 | 10 | ||
9 | <!-- Used in layouts --> | 11 | <!-- Used in layouts --> |
10 | <color name="cos_skyblue2">#22A9B5</color> | 12 | <color name="cos_skyblue2">#22A9B5</color> | ... | ... |
... | @@ -5,7 +5,7 @@ | ... | @@ -5,7 +5,7 @@ |
5 | </style> | 5 | </style> |
6 | 6 | ||
7 | <style name="SDKAppTheme" parent="Theme.MaterialComponents.Light.DarkActionBar"> | 7 | <style name="SDKAppTheme" parent="Theme.MaterialComponents.Light.DarkActionBar"> |
8 | - <item name="android:statusBarColor">@android:color/white</item> | 8 | + <item name="android:statusBarColor">@color/cos_grey_light</item> |
9 | <item name="android:windowLightStatusBar">true</item> | 9 | <item name="android:windowLightStatusBar">true</item> |
10 | <item name="android:forceDarkAllowed" tools:targetApi="q">false</item> | 10 | <item name="android:forceDarkAllowed" tools:targetApi="q">false</item> |
11 | </style> | 11 | </style> | ... | ... |
-
Please register or login to post a comment