Panagiotis Triantafyllou

new gradle, fixes for new gradle

...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
15 </deviceKey> 15 </deviceKey>
16 </Target> 16 </Target>
17 </runningDeviceTargetSelectedWithDropDown> 17 </runningDeviceTargetSelectedWithDropDown>
18 - <timeTargetWasSelectedWithDropDown value="2024-07-26T13:26:33.140020Z" /> 18 + <timeTargetWasSelectedWithDropDown value="2024-07-26T14:53:01.900442Z" />
19 </State> 19 </State>
20 </entry> 20 </entry>
21 </value> 21 </value>
......
...@@ -3,6 +3,7 @@ apply plugin: 'com.android.application' ...@@ -3,6 +3,7 @@ apply plugin: 'com.android.application'
3 //apply plugin: 'com.huawei.agconnect' 3 //apply plugin: 'com.huawei.agconnect'
4 4
5 android { 5 android {
6 + namespace "warp.ly.android_sdk"
6 compileSdkVersion 34 7 compileSdkVersion 34
7 buildToolsVersion "34.0.0" 8 buildToolsVersion "34.0.0"
8 9
......
1 <?xml version="1.0" encoding="utf-8"?> 1 <?xml version="1.0" encoding="utf-8"?>
2 -<manifest xmlns:android="http://schemas.android.com/apk/res/android" 2 +<manifest xmlns:android="http://schemas.android.com/apk/res/android">
3 - package="warp.ly.android_sdk">
4 3
5 <uses-permission android:name="android.permission.INTERNET" /> 4 <uses-permission android:name="android.permission.INTERNET" />
6 <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> 5 <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
......
...@@ -8,7 +8,7 @@ buildscript { ...@@ -8,7 +8,7 @@ buildscript {
8 maven { url 'https://plugins.gradle.org/m2/' } 8 maven { url 'https://plugins.gradle.org/m2/' }
9 } 9 }
10 dependencies { 10 dependencies {
11 - classpath 'com.android.tools.build:gradle:7.1.3' 11 + classpath 'com.android.tools.build:gradle:8.1.4'
12 classpath 'com.google.gms:google-services:4.3.10' 12 classpath 'com.google.gms:google-services:4.3.10'
13 classpath 'com.huawei.agconnect:agcp:1.7.2.300' 13 classpath 'com.huawei.agconnect:agcp:1.7.2.300'
14 classpath 'io.github.gradle-nexus:publish-plugin:1.1.0' 14 classpath 'io.github.gradle-nexus:publish-plugin:1.1.0'
......
1 +#Fri Jul 26 17:08:44 EEST 2024
1 distributionBase=GRADLE_USER_HOME 2 distributionBase=GRADLE_USER_HOME
2 distributionPath=wrapper/dists 3 distributionPath=wrapper/dists
3 -distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip 4 +distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip
4 zipStoreBase=GRADLE_USER_HOME 5 zipStoreBase=GRADLE_USER_HOME
5 zipStorePath=wrapper/dists 6 zipStorePath=wrapper/dists
......
...@@ -32,7 +32,7 @@ afterEvaluate { ...@@ -32,7 +32,7 @@ afterEvaluate {
32 32
33 // Two artifacts, the `aar` (or `jar`) and the sources 33 // Two artifacts, the `aar` (or `jar`) and the sources
34 if (project.plugins.findPlugin("com.android.library")) { 34 if (project.plugins.findPlugin("com.android.library")) {
35 - from components.release 35 + from components.findByName('release')
36 } else { 36 } else {
37 from components.java 37 from components.java
38 } 38 }
......
...@@ -9,7 +9,7 @@ ext { ...@@ -9,7 +9,7 @@ ext {
9 apply from: "${rootProject.projectDir}/scripts/publish-module.gradle" 9 apply from: "${rootProject.projectDir}/scripts/publish-module.gradle"
10 10
11 android { 11 android {
12 - 12 + namespace 'ly.warp.sdk'
13 compileSdkVersion 34 13 compileSdkVersion 34
14 buildToolsVersion "34.0.0" 14 buildToolsVersion "34.0.0"
15 15
...@@ -107,9 +107,6 @@ dependencies { ...@@ -107,9 +107,6 @@ dependencies {
107 implementation 'com.squareup.retrofit2:retrofit:2.9.0' 107 implementation 'com.squareup.retrofit2:retrofit:2.9.0'
108 implementation 'com.squareup.retrofit2:converter-gson:2.9.0' 108 implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
109 109
110 - //------------------------------ Expandable Layout -----------------------------//
111 - api 'net.cachapa.expandablelayout:expandablelayout:2.9.2'
112 -
113 //------------------------------ Lifecycle -----------------------------// 110 //------------------------------ Lifecycle -----------------------------//
114 implementation "androidx.lifecycle:lifecycle-extensions:2.2.0" 111 implementation "androidx.lifecycle:lifecycle-extensions:2.2.0"
115 112
......
1 <manifest xmlns:android="http://schemas.android.com/apk/res/android" 1 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
2 - xmlns:tools="http://schemas.android.com/tools" 2 + xmlns:tools="http://schemas.android.com/tools">
3 - package="ly.warp.sdk">
4 3
5 <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> 4 <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
6 <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> 5 <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
...@@ -177,57 +176,6 @@ ...@@ -177,57 +176,6 @@
177 </intent-filter> 176 </intent-filter>
178 </activity> 177 </activity>
179 178
180 - <!-- Service used for updating user's location. -->
181 - <service
182 - android:name=".services.UpdateUserLocationService"
183 - android:exported="false"
184 - android:permission="android.permission.BIND_JOB_SERVICE" />
185 -
186 - <service
187 - android:name=".services.EventService"
188 - android:exported="false"
189 - android:permission="android.permission.BIND_JOB_SERVICE" />
190 -
191 - <service
192 - android:name=".services.VouchersFetchedService"
193 - android:exported="false"
194 - android:permission="android.permission.BIND_JOB_SERVICE" />
195 -
196 - <service
197 - android:name=".services.EventCouponsService"
198 - android:exported="false"
199 - android:permission="android.permission.BIND_JOB_SERVICE" />
200 -
201 - <service
202 - android:name=".services.EventRewardsCouponsService"
203 - android:exported="false"
204 - android:permission="android.permission.BIND_JOB_SERVICE" />
205 -
206 - <service
207 - android:name=".services.EventUnifiedCouponsService"
208 - android:exported="false"
209 - android:permission="android.permission.BIND_JOB_SERVICE" />
210 -
211 - <service
212 - android:name=".services.EventCampaignCouponService"
213 - android:exported="false"
214 - android:permission="android.permission.BIND_JOB_SERVICE" />
215 -
216 - <service
217 - android:name=".services.EventCampaignService"
218 - android:exported="false"
219 - android:permission="android.permission.BIND_JOB_SERVICE" />
220 -
221 - <service
222 - android:name=".services.EventRefreshDeviceTokenService"
223 - android:exported="false"
224 - android:permission="android.permission.BIND_JOB_SERVICE" />
225 -
226 - <service
227 - android:name=".services.EventQuestionnaireService"
228 - android:exported="false"
229 - android:permission="android.permission.BIND_JOB_SERVICE" />
230 -
231 <!-- android:stopWithTask="false"--> 179 <!-- android:stopWithTask="false"-->
232 <!-- android:process=":warplyHealthService"--> 180 <!-- android:process=":warplyHealthService"-->
233 <!-- <service--> 181 <!-- <service-->
......
1 -package ly.warp.sdk.activities;
2 -
3 -import android.app.Activity;
4 -import android.content.Intent;
5 -import android.os.Bundle;
6 -import android.os.Handler;
7 -import android.text.TextUtils;
8 -import android.view.View;
9 -import android.widget.ImageView;
10 -import android.widget.LinearLayout;
11 -import android.widget.RelativeLayout;
12 -import android.widget.ScrollView;
13 -import android.widget.TextView;
14 -
15 -import androidx.appcompat.app.AlertDialog;
16 -import androidx.cardview.widget.CardView;
17 -import androidx.constraintlayout.widget.ConstraintLayout;
18 -import androidx.core.content.ContextCompat;
19 -import androidx.core.widget.NestedScrollView;
20 -import androidx.recyclerview.widget.LinearLayoutManager;
21 -import androidx.recyclerview.widget.RecyclerView;
22 -
23 -import com.bumptech.glide.Glide;
24 -import com.bumptech.glide.load.engine.DiskCacheStrategy;
25 -
26 -import net.cachapa.expandablelayout.ExpandableLayout;
27 -
28 -import org.apmem.tools.layouts.FlowLayout;
29 -import org.greenrobot.eventbus.EventBus;
30 -import org.greenrobot.eventbus.Subscribe;
31 -
32 -import java.util.ArrayList;
33 -
34 -import ly.warp.sdk.R;
35 -import ly.warp.sdk.io.models.ActiveDFYCouponEventModel;
36 -import ly.warp.sdk.io.models.LoyaltySDKFirebaseEventModel;
37 -import ly.warp.sdk.io.models.UnifiedCoupon;
38 -import ly.warp.sdk.io.models.VouchersActivityEventModel;
39 -import ly.warp.sdk.io.models.WarplyDealsAnalysisEventModel;
40 -import ly.warp.sdk.utils.WarpUtils;
41 -import ly.warp.sdk.utils.WarplyManagerHelper;
42 -import ly.warp.sdk.utils.managers.WarplyAnalyticsManager;
43 -import ly.warp.sdk.utils.managers.WarplyEventBusManager;
44 -import ly.warp.sdk.views.adapters.ActiveCouponAdapter;
45 -import ly.warp.sdk.views.adapters.MarketCouponAdapter;
46 -
47 -
48 -public class LoyaltyWallet extends Activity implements View.OnClickListener, View.OnScrollChangeListener {
49 -
50 - // ===========================================================
51 - // Constants
52 - // ===========================================================
53 -
54 - // ===========================================================
55 - // Fields
56 - // ===========================================================
57 -
58 - private ImageView mIvBack, mIvDealsLogo, mIvProfilePhoto, mIvExpArrow;
59 - private TextView mTvUsername, mTvDealsValue, mTvDealsValueAll,
60 - mTvUserBadge, mTvGiftsValue, mTvGiftsValueAll, mTvActiveCode, mTvActiveDate,
61 - mTvActiveTitle, mTvActiveCouponsHeader, mTvMarketValue, mTvMarketAll, mTvFavValue,
62 - mTvFavValueAll, mTvDealsCountBadge, mTvUnifiedCountBadge, mTvGiftsCountBadge,
63 - mTvVouchersDisabledTitle, mTvVouchersDisabledSubtitle, mTvVouchersTitle, mTvVouchersSubtitle;
64 - private ConstraintLayout mClDealsBanner, mClDealsView,
65 - mClGiftsBanner, mClToolbar, mClMarket;
66 - private LinearLayout mLlQuestionnaire, mLlUserBadge, mLlEmptyWallet, mLlDeals, mLlGifts,
67 - mLlMarketView, mLlHistory, mLlBannerInfo, mLlVouchers, mLlVouchersSpinner,
68 - mLlVouchersDisabled;
69 - private FlowLayout mLlActiveCodesView;
70 - private float couponDfyValue = 0.0f, mFavValue = 0.0f;
71 - private RecyclerView mRecyclerCoupons, mRvMarketCoupons;
72 - private ActiveCouponAdapter mAdapterCoupons;
73 - private AlertDialog mAlertDialogNonTelco, mAlertDialogVouchersService;
74 - private ScrollView mScActiveCodes;
75 - private NestedScrollView mSvLoyaltyWallet;
76 - private int mTimer = 0;
77 - private Handler mSecondsHandler;
78 - private ArrayList<UnifiedCoupon> mUnifiedCoupons = new ArrayList<UnifiedCoupon>();
79 - private float countValue = 0.0f;
80 - private MarketCouponAdapter mAdapterMarketCoupons;
81 - private ExpandableLayout mElGifts;
82 - private boolean mIsStayCollapsed = true;
83 - private CardView mClExp, mCvVouchers, mCvVouchersDisabled;
84 - private boolean mDfyPressed = false, mDealsBannerPressed = false, mQuestionnairePressed = false,
85 - mHistoryPressed = false, mHistoryMarketPressed = false, mUnifiedPressed = false,
86 - mCouponPressed = false, mHistoryBadgePressed = false, mUnifiedCountPressed = false,
87 - mGiftsCountPressed = false;
88 - private RelativeLayout mRlDeals, mRlUnified, mRlGifts;
89 - private View mSeparator, mSeparatorDisabled;
90 -
91 - // ===========================================================
92 - // Methods for/from SuperClass/Interfaces
93 - // ===========================================================
94 -
95 - @Override
96 - public void onCreate(Bundle savedInstanceState) {
97 - super.onCreate(savedInstanceState);
98 - setContentView(R.layout.activity_loyalty_wallet);
99 - mSecondsHandler = new Handler();
100 -
101 - mIvBack = findViewById(R.id.iv_back);
102 - mTvUsername = findViewById(R.id.tv_profile_name);
103 - mLlQuestionnaire = findViewById(R.id.ll_user_questionnaire);
104 - mLlUserBadge = findViewById(R.id.ll_user_badge);
105 - mTvUserBadge = findViewById(R.id.tv_type);
106 - mTvGiftsValue = findViewById(R.id.tv_gifts_value);
107 - mTvGiftsValueAll = findViewById(R.id.tv_gifts_value_all);
108 - mClDealsBanner = findViewById(R.id.cl_deals_win_inner_cos);
109 - mClGiftsBanner = findViewById(R.id.cl_deals_win_inner);
110 - mTvDealsValue = findViewById(R.id.tv_deals_value);
111 - mTvDealsValueAll = findViewById(R.id.tv_deals_value_all);
112 - mTvActiveCode = findViewById(R.id.tv_active_deals_text);
113 - mTvActiveDate = findViewById(R.id.tv_active_deals_date_text);
114 - mIvDealsLogo = findViewById(R.id.dfy_logo);
115 - mClDealsView = findViewById(R.id.cl_mygifts);
116 - mLlDeals = findViewById(R.id.ll_mygifts);
117 - mIvProfilePhoto = findViewById(R.id.iv_profile_photo);
118 - mTvActiveTitle = findViewById(R.id.tv_active_gifts);
119 - mTvActiveCouponsHeader = findViewById(R.id.tv_active_coupons_header);
120 - mLlEmptyWallet = findViewById(R.id.ll_empty_wallet);
121 - mLlActiveCodesView = findViewById(R.id.ll_active_deals_codes_view);
122 - mScActiveCodes = findViewById(R.id.sv_active_deals_codes_view);
123 - mSvLoyaltyWallet = findViewById(R.id.sv_loyalty_wallet);
124 - mClToolbar = findViewById(R.id.cl_loyalty_wallet_header);
125 - mLlGifts = findViewById(R.id.ll_gifts_view);
126 - mLlMarketView = findViewById(R.id.ll_market_view);
127 - mRvMarketCoupons = findViewById(R.id.rv_market_coupons);
128 - mRvMarketCoupons.setNestedScrollingEnabled(false);
129 - mRvMarketCoupons.setLayoutManager(new LinearLayoutManager(this, LinearLayoutManager.VERTICAL, false));
130 - mElGifts = findViewById(R.id.el_exp);
131 - mClExp = findViewById(R.id.cl_exp);
132 - mIvExpArrow = findViewById(R.id.iv_exp_arrow);
133 - mTvMarketValue = findViewById(R.id.tv_market_value);
134 - mTvMarketAll = findViewById(R.id.tv_market_value_all);
135 - mClMarket = findViewById(R.id.cl_market_inner);
136 - mTvFavValue = findViewById(R.id.tv_exp_value);
137 - mTvFavValueAll = findViewById(R.id.tv_exp_value_all);
138 - mLlHistory = findViewById(R.id.ll_loyalty_history);
139 - mTvDealsCountBadge = findViewById(R.id.tv_deals_count);
140 - mTvUnifiedCountBadge = findViewById(R.id.tv_sm_count);
141 - mTvGiftsCountBadge = findViewById(R.id.tv_gifts_count);
142 - mLlBannerInfo = findViewById(R.id.ll_banner_info_new);
143 - mRlDeals = findViewById(R.id.rv_deals_count);
144 - mRlUnified = findViewById(R.id.rv_sm_count);
145 - mRlGifts = findViewById(R.id.rv_gifts_count);
146 - mRecyclerCoupons = findViewById(R.id.rv_active_coupons);
147 - mCvVouchers = findViewById(R.id.cv_vouchers);
148 - mCvVouchersDisabled = findViewById(R.id.cv_vouchers_disabled);
149 - mLlVouchers = findViewById(R.id.ll_vouchers);
150 - mLlVouchersDisabled = findViewById(R.id.ll_vouchers_disabled);
151 - mLlVouchersSpinner = findViewById(R.id.ll_vouchers_spinner);
152 - mSeparator = findViewById(R.id.v_separator_vouchers);
153 - mSeparatorDisabled = findViewById(R.id.v_separator_vouchers_disabled);
154 - mTvVouchersDisabledTitle = findViewById(R.id.tv_vouchers_title_disabled);
155 - mTvVouchersDisabledSubtitle = findViewById(R.id.tv_vouchers_info_title_disabled);
156 - mTvVouchersTitle = findViewById(R.id.tv_vouchers_title);
157 - mTvVouchersSubtitle = findViewById(R.id.tv_vouchers_info_title);
158 -
159 - /** Deals Badge */
160 -// if (WarplyManagerHelper.getActiveDFYCoupons() != null) {
161 -// Collections.sort(WarplyManagerHelper.getActiveDFYCoupons(), new Comparator<ActiveDFYCouponModel>() {
162 -// public int compare(ActiveDFYCouponModel o1, ActiveDFYCouponModel o2) {
163 -// return o1.getDate().compareTo(o2.getDate());
164 -// }
165 -// });
166 -// }
167 - /** Deals Badge */
168 - }
169 -
170 - @Override
171 - protected void onStart() {
172 - super.onStart();
173 - if (!EventBus.getDefault().isRegistered(this))
174 - EventBus.getDefault().register(this);
175 - }
176 -
177 - @Override
178 - protected void onStop() {
179 - super.onStop();
180 -// EventBus.getDefault().unregister(this);
181 - }
182 -
183 - @Override
184 - public void onDestroy() {
185 - super.onDestroy();
186 - WarplyManagerHelper.clearShowVouchersBanner();
187 - EventBus.getDefault().unregister(this);
188 - }
189 -
190 - @Override
191 - public void onResume() {
192 - super.onResume();
193 - WarplyAnalyticsManager.logTrackersEvent(this, "screen", "LoyaltyWalletScreen");
194 - mTimer = 0;
195 - mSecondsHandler.post(new Runnable() {
196 - @Override
197 - public void run() {
198 - mTimer++;
199 - mSecondsHandler.postDelayed(this, 1000);
200 - }
201 - });
202 - mDfyPressed = false;
203 - mDealsBannerPressed = false;
204 - mQuestionnairePressed = false;
205 - mHistoryPressed = false;
206 - mHistoryMarketPressed = false;
207 - mUnifiedPressed = false;
208 - mCouponPressed = false;
209 - mHistoryBadgePressed = false;
210 - mGiftsCountPressed = false;
211 - mUnifiedCountPressed = false;
212 - initViews();
213 - }
214 -
215 - @Override
216 - public void onPause() {
217 - super.onPause();
218 - if (mSecondsHandler != null) {
219 - mSecondsHandler.removeCallbacksAndMessages(null);
220 -
221 - LoyaltySDKFirebaseEventModel analyticsEvent = new LoyaltySDKFirebaseEventModel();
222 - analyticsEvent.setEventName("time_spent_on_loyalty_sdk");
223 - analyticsEvent.setParameter("name", "MyRewards");
224 - analyticsEvent.setParameter("seconds", String.valueOf(mTimer));
225 - EventBus.getDefault().post(new WarplyEventBusManager(analyticsEvent));
226 - }
227 - }
228 -
229 - @Override
230 - public void onClick(View view) {
231 - if (view.getId() == R.id.iv_back) {
232 - onBackPressed();
233 - return;
234 - }
235 - if (view.getId() == R.id.ll_user_questionnaire || view.getId() == R.id.ll_user_badge) {
236 - if (!WarplyManagerHelper.noInternetDialog(this, true)) {
237 - WarplyManagerHelper.noInternetDialog(this);
238 - return;
239 - }
240 - if (!mQuestionnairePressed) {
241 - mQuestionnairePressed = true;
242 - WarplyAnalyticsManager.logTrackersEvent(this, "click", ("LoyaltyWalletScreen")
243 - .concat(":")
244 - .concat("Questionnaire"));
245 -
246 - startActivityForResult(WarpViewActivity.createIntentFromURL(LoyaltyWallet.this, WarplyManagerHelper.openQuestionnaire()), 1000);
247 - }
248 - return;
249 - }
250 - /** Deals History */
251 - if (view.getId() == R.id.cl_deals_win_inner_cos) {
252 - if (!mDealsBannerPressed) {
253 - mDealsBannerPressed = true;
254 - WarplyAnalyticsManager.logTrackersEvent(this, "click", ("LoyaltyWalletScreen")
255 - .concat(":")
256 - .concat("DealsBanner"));
257 -
258 - WarplyDealsAnalysisEventModel warplyDealsAnalysisEventModel = new WarplyDealsAnalysisEventModel();
259 - warplyDealsAnalysisEventModel.setPressed(true);
260 - EventBus.getDefault().post(new WarplyEventBusManager(warplyDealsAnalysisEventModel));
261 -
262 - LoyaltySDKFirebaseEventModel analyticsEvent = new LoyaltySDKFirebaseEventModel();
263 - analyticsEvent.setEventName("did_tap_deals_for_you_badge");
264 - analyticsEvent.setParameter("screen", "Loyalty Wallet");
265 - EventBus.getDefault().post(new WarplyEventBusManager(analyticsEvent));
266 - }
267 - return;
268 - }
269 - /** Active Unified Banner */
270 - if (view.getId() == R.id.rv_sm_count) {
271 - if (!mUnifiedCountPressed) {
272 - mUnifiedCountPressed = true;
273 - WarplyAnalyticsManager.logTrackersEvent(this, "click", ("LoyaltyWalletScreen")
274 - .concat(":")
275 - .concat("ActiveMarketBanner"));
276 -
277 -// LoyaltySDKFirebaseEventModel analyticsEvent = new LoyaltySDKFirebaseEventModel();
278 -// analyticsEvent.setEventName("did_tap_sm_deals_badge");
279 -// analyticsEvent.setParameter("screen", "Loyalty Wallet");
280 -// EventBus.getDefault().post(new WarplyEventBusManager(analyticsEvent));
281 -
282 - LoyaltySDKFirebaseEventModel analyticsEvent = new LoyaltySDKFirebaseEventModel();
283 - analyticsEvent.setEventName("did_tap_market_active_badge");
284 - analyticsEvent.setParameter("screen", "Loyalty Wallet");
285 - EventBus.getDefault().post(new WarplyEventBusManager(analyticsEvent));
286 -
287 - Intent intent = new Intent(LoyaltyWallet.this, ActiveUnifiedCouponsActivity.class);
288 - startActivity(intent);
289 - }
290 - return;
291 - }
292 - /** Active Coupons Banner */
293 - if (view.getId() == R.id.rv_gifts_count) {
294 - if (!mGiftsCountPressed) {
295 - mGiftsCountPressed = true;
296 - WarplyAnalyticsManager.logTrackersEvent(this, "click", ("LoyaltyWalletScreen")
297 - .concat(":")
298 - .concat("ActiveLoyaltyBanner"));
299 -
300 -// LoyaltySDKFirebaseEventModel analyticsEvent = new LoyaltySDKFirebaseEventModel();
301 -// analyticsEvent.setEventName("did_tap_gifts_badge");
302 -// analyticsEvent.setParameter("screen", "Loyalty Wallet");
303 -// EventBus.getDefault().post(new WarplyEventBusManager(analyticsEvent));
304 -
305 - LoyaltySDKFirebaseEventModel analyticsEvent = new LoyaltySDKFirebaseEventModel();
306 - analyticsEvent.setEventName("did_tap_gifts_for_you_active_badge");
307 - analyticsEvent.setParameter("screen", "Loyalty Wallet");
308 - EventBus.getDefault().post(new WarplyEventBusManager(analyticsEvent));
309 -
310 - Intent intent = new Intent(LoyaltyWallet.this, ActiveCouponsActivity.class);
311 - startActivity(intent);
312 - }
313 - return;
314 - }
315 - /** Coupons History */
316 - if (view.getId() == R.id.cl_deals_win_inner) {
317 - if (!mHistoryPressed) {
318 - mHistoryPressed = true;
319 - WarplyAnalyticsManager.logTrackersEvent(this, "click", ("LoyaltyWalletScreen")
320 - .concat(":")
321 - .concat("LoyaltyBanner"));
322 -
323 - LoyaltySDKFirebaseEventModel analyticsEvent = new LoyaltySDKFirebaseEventModel();
324 - analyticsEvent.setEventName("did_tap_gifts_for_you_badge");
325 - analyticsEvent.setParameter("screen", "Loyalty Wallet");
326 - EventBus.getDefault().post(new WarplyEventBusManager(analyticsEvent));
327 -
328 - Intent intent = new Intent(LoyaltyWallet.this, LoyaltyAnalysisActivity.class);
329 - startActivity(intent);
330 - }
331 - return;
332 - }
333 - if (view.getId() == R.id.cl_exp) {
334 - if (!mIsStayCollapsed) {
335 - mElGifts.toggle(true);
336 - if (mElGifts.isExpanded()) {
337 - mIvExpArrow.setImageDrawable(ContextCompat.getDrawable(this, R.drawable.ic_up_dark_new));
338 - } else {
339 - mIvExpArrow.setImageDrawable(ContextCompat.getDrawable(this, R.drawable.ic_down_dark_new));
340 - }
341 - }
342 - return;
343 - }
344 - /** Unified History */
345 - if (view.getId() == R.id.cl_market_inner) {
346 - if (!mHistoryMarketPressed) {
347 - mHistoryMarketPressed = true;
348 - WarplyAnalyticsManager.logTrackersEvent(this, "click", ("LoyaltyWalletScreen")
349 - .concat(":")
350 - .concat("MarketBanner"));
351 -
352 - LoyaltySDKFirebaseEventModel analyticsEvent = new LoyaltySDKFirebaseEventModel();
353 - analyticsEvent.setEventName("did_tap_market_badge");
354 - analyticsEvent.setParameter("screen", "Loyalty Wallet");
355 - EventBus.getDefault().post(new WarplyEventBusManager(analyticsEvent));
356 -
357 - Intent intent = new Intent(LoyaltyWallet.this, LoyaltyMarketAnalysisActivity.class);
358 - startActivity(intent);
359 - }
360 - return;
361 - }
362 - /** New History */
363 - if (view.getId() == R.id.ll_loyalty_history) {
364 - if (!mHistoryBadgePressed) {
365 - WarplyAnalyticsManager.logTrackersEvent(this, "click", ("LoyaltyWalletScreen")
366 - .concat(":")
367 - .concat("LoyaltyHistoryBadge"));
368 -
369 - LoyaltySDKFirebaseEventModel analyticsEvent = new LoyaltySDKFirebaseEventModel();
370 - analyticsEvent.setEventName("did_tap_history_badge");
371 - analyticsEvent.setParameter("screen", "Loyalty Wallet");
372 - EventBus.getDefault().post(new WarplyEventBusManager(analyticsEvent));
373 -
374 - Intent intent = new Intent(LoyaltyWallet.this, LoyaltyHistoryActivity.class);
375 - startActivity(intent);
376 - }
377 - return;
378 - }
379 - /** Vouchers Client's Screen */
380 - if (view.getId() == R.id.cv_vouchers || view.getId() == R.id.cv_vouchers_disabled) {
381 - WarplyAnalyticsManager.logTrackersEvent(this, "click", ("LoyaltyWalletScreen")
382 - .concat(":")
383 - .concat("VouchersBadge"));
384 -
385 - LoyaltySDKFirebaseEventModel analyticsEvent = new LoyaltySDKFirebaseEventModel();
386 - analyticsEvent.setEventName("did_tap_vouchers_badge");
387 - analyticsEvent.setParameter("screen", "Loyalty Wallet");
388 - EventBus.getDefault().post(new WarplyEventBusManager(analyticsEvent));
389 -
390 - VouchersActivityEventModel vouchersActivity = new VouchersActivityEventModel();
391 - EventBus.getDefault().post(new WarplyEventBusManager(vouchersActivity));
392 - return;
393 - }
394 - /** Active Deals Banner */
395 - if (view.getId() == R.id.cl_mygifts || view.getId() == R.id.rv_deals_count) {
396 - if (!mDfyPressed) {
397 - mDfyPressed = true;
398 - WarplyAnalyticsManager.logTrackersEvent(this, "click", ("LoyaltyWalletScreen")
399 - .concat(":")
400 - .concat("ActiveDealsBanner"));
401 -
402 - LoyaltySDKFirebaseEventModel analyticsEvent = new LoyaltySDKFirebaseEventModel();
403 - analyticsEvent.setEventName("did_tap_deals_for_you_active_badge");
404 - analyticsEvent.setParameter("screen", "Loyalty Wallet");
405 - EventBus.getDefault().post(new WarplyEventBusManager(analyticsEvent));
406 -
407 - ActiveDFYCouponEventModel activeCouponEventModel = new ActiveDFYCouponEventModel();
408 - activeCouponEventModel.setPressed(true);
409 - EventBus.getDefault().post(new WarplyEventBusManager(activeCouponEventModel));
410 - }
411 - }
412 - }
413 -
414 - @Override
415 - public void onScrollChange(View view, int scrollX, int scrollY, int oldScrollX, int oldScrollY) {
416 - if (scrollY > oldScrollY) {
417 - mClToolbar.setElevation(14);
418 - }
419 - if (scrollY < oldScrollY) {
420 - mClToolbar.setElevation(14);
421 - }
422 - if (scrollY == 0) {
423 - mClToolbar.setElevation(0);
424 - }
425 - }
426 -
427 - @Override
428 - protected void onActivityResult(int requestCode, int resultCode, Intent data) {
429 - if (requestCode == 1000) {
430 - if (resultCode == RESULT_OK) {
431 - if (!TextUtils.isEmpty(WarplyManagerHelper.getUserTag(LoyaltyWallet.this))) {
432 - mTvUserBadge.setText(WarplyManagerHelper.getUserTag(LoyaltyWallet.this));
433 - mLlQuestionnaire.setVisibility(View.GONE);
434 - mLlUserBadge.setVisibility(View.VISIBLE);
435 - } else {
436 - mLlUserBadge.setVisibility(View.GONE);
437 - mLlQuestionnaire.setVisibility(View.VISIBLE);
438 - }
439 - }
440 - }
441 - }
442 -
443 - @Subscribe()
444 - public void onMessageEvent(WarplyEventBusManager event) {
445 - if (event.getVouchersServiceUnavailableEventModel() != null) {
446 - runOnUiThread(this::vouchersServiceUnavailableDialog);
447 - return;
448 - }
449 - if (event.getVouchersFetched() != null) {
450 - /** Vouchers */
451 - runOnUiThread(this::checkForEmpty);
452 - /** Vouchers */
453 - return;
454 - }
455 - if (event.getUnifiedCouponsAdded() != null) {
456 - /** Unified Coupons List */
457 -// if (WarplyManagerHelper.getMarketCouponsList() != null && WarplyManagerHelper.getMarketCouponsList().size() > 0) {
458 -// ArrayList<UnifiedCoupon> tempCouponList = new ArrayList<UnifiedCoupon>();
459 -// tempCouponList.addAll(WarplyManagerHelper.getMarketCouponsList());
460 -//
461 -// ArrayList<UnifiedCoupon> unilist = new ArrayList<UnifiedCoupon>();
462 -// for (UnifiedCoupon unicpn : tempCouponList) {
463 -// SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
464 -// Date newDate = new Date();
465 -// try {
466 -// newDate = simpleDateFormat.parse(unicpn.getCreated());
467 -// } catch (ParseException e) {
468 -// e.printStackTrace();
469 -// }
470 -// unicpn.setExpirationDate(newDate);
471 -// unilist.add(unicpn);
472 -// }
473 -//
474 -// Collections.sort(unilist, (coupon1, coupon2) -> coupon2.getExpirationDate().compareTo(coupon1.getExpirationDate()));
475 -//
476 -// runOnUiThread(() -> {
477 -// mAdapterMarketCoupons = new MarketCouponAdapter(this, unilist);
478 -// mRvMarketCoupons.setAdapter(mAdapterMarketCoupons);
479 -// mAdapterMarketCoupons.getPositionClicks()
480 -// .doOnNext(coupon -> {
481 -// if (!mUnifiedPressed) {
482 -// mUnifiedPressed = true;
483 -// WarplyAnalyticsManager.logTrackersEvent(this, "click", ("UnifiedCoupon").concat(":").concat(coupon.getBarcode()));
484 -// Intent intent = new Intent(LoyaltyWallet.this, UnifiedCouponInfoActivity.class);
485 -// intent.putExtra("coupon", (Serializable) coupon);
486 -// intent.putExtra("isFromWallet", true);
487 -// startActivity(intent);
488 -// }
489 -//// startActivityForResult(intent, 1002);
490 -// })
491 -// .doOnError(error -> {
492 -// })
493 -// .subscribe();
494 -// mAdapterMarketCoupons.notifyDataSetChanged();
495 -// mLlMarketView.setVisibility(View.VISIBLE);
496 -//
497 -// // Third Expandable Banner
498 -// if (tempCouponList != null && tempCouponList.size() > 0) {
499 -// countValue = 0.0f;
500 -//
501 -// if (WarplyManagerHelper.getCouponRedeemedList().size() > 0) {
502 -// if (WarplyManagerHelper.getCouponsetsDeals().size() > 0) {
503 -// for (Couponset couset : WarplyManagerHelper.getCouponsetsDeals()) {
504 -// for (Coupon cou : WarplyManagerHelper.getCouponRedeemedList()) {
505 -// if (cou.getCouponsetUuid().equals(couset.getUuid())) {
506 -// countValue += Float.valueOf(cou.getDiscount());
507 -// cou.setDescription(couset.getShortDescription());
508 -// cou.setImage(couset.getImgPreview());
509 -// cou.setName(couset.getName());
510 -// cou.setMerchantUuid(couset.getMerchantUuid());
511 -// cou.setInnerText(couset.getInnerText());
512 -// cou.setDiscount_type(couset.getDiscount_type());
513 -// cou.setFinal_price(couset.getFinal_price());
514 -// break;
515 -// }
516 -// }
517 -// }
518 -// }
519 -// }
520 -//
521 -// mFavValue += countValue;
522 -// String badgeValue = String.format("%.02f", countValue);
523 -// mTvMarketValue.setText(String.format(getString(R.string.cos_value), badgeValue));
524 -// if (String.valueOf(countValue).length() >= 3) {
525 -// mTvMarketValue.setTextSize(12);
526 -// } else {
527 -// mTvMarketValue.setTextSize(14);
528 -// }
529 -// SpannableStringBuilder sBuilderThird = new SpannableStringBuilder();
530 -// sBuilderThird.append(String.format(getString(R.string.cos_supermarket_win), badgeValue));
531 -// CalligraphyTypefaceSpan typefaceBoldSpanThird = new CalligraphyTypefaceSpan(TypefaceUtils.load(getAssets(), "fonts/PeridotPE-Bold.ttf"));
532 -// sBuilderThird.setSpan(typefaceBoldSpanThird, 15, 16 + badgeValue.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
533 -// mTvMarketAll.setText(sBuilderThird, TextView.BufferType.SPANNABLE);
534 -// } else {
535 -// String badgeValue = String.format("%.02f", 0.0f);
536 -// mTvMarketValue.setText(String.format(getString(R.string.cos_value), badgeValue));
537 -// SpannableStringBuilder sBuilderThird = new SpannableStringBuilder();
538 -// sBuilderThird.append(String.format(getString(R.string.cos_supermarket_win), badgeValue));
539 -// CalligraphyTypefaceSpan typefaceBoldSpanThird = new CalligraphyTypefaceSpan(TypefaceUtils.load(getAssets(), "fonts/PeridotPE-Bold.ttf"));
540 -// sBuilderThird.setSpan(typefaceBoldSpanThird, 15, 16 + badgeValue.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
541 -// mTvMarketAll.setText(sBuilderThird, TextView.BufferType.SPANNABLE);
542 -// }
543 -// });
544 -// } else {
545 -// runOnUiThread(() -> {
546 -// mLlMarketView.setVisibility(View.GONE);
547 -// });
548 -// }
549 - /** Unified Coupons List */
550 -
551 - runOnUiThread(() -> {
552 - if (WarplyManagerHelper.getMarketCouponsList() != null && WarplyManagerHelper.getMarketCouponsList().size() > 0)
553 - mTvUnifiedCountBadge.setText(String.valueOf(WarplyManagerHelper.getMarketCouponsList().size()));
554 - else
555 - mTvUnifiedCountBadge.setText("0");
556 - checkForEmpty();
557 - });
558 - return;
559 - }
560 - if (event.getCouponsAdded() != null) {
561 - /** Coupons List */
562 -// CouponList tempCouponList = new CouponList();
563 -// CouponList cpnlist = new CouponList();
564 -// tempCouponList.clear();
565 -// tempCouponList.addAll(WarplyManagerHelper.getCouponList());
566 -//
567 -// for (Coupon cpn : tempCouponList) {
568 -// if (cpn.getStatus() == 1) {
569 -// SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd hh:mm");
570 -// Date newDate = new Date();
571 -// try {
572 -// newDate = simpleDateFormat.parse(cpn.getExpiration());
573 -// } catch (ParseException e) {
574 -// e.printStackTrace();
575 -// }
576 -// cpn.setExpirationDate(newDate);
577 -// cpnlist.add(cpn);
578 -// }
579 -// }
580 -//
581 -// Collections.sort(cpnlist, (coupon1, coupon2) -> coupon1.getExpirationDate().compareTo(coupon2.getExpirationDate()));
582 -//
583 -// runOnUiThread(() -> {
584 -// if (cpnlist != null && cpnlist.size() > 0) {
585 -// mAdapterCoupons = new ActiveCouponAdapter(this, cpnlist);
586 -// mRecyclerCoupons.setAdapter(mAdapterCoupons);
587 -// mAdapterCoupons.getPositionClicks()
588 -// .doOnNext(coupon -> {
589 -// if (!mCouponPressed) {
590 -// mCouponPressed = true;
591 -// WarplyAnalyticsManager.logTrackersEvent(this, "click", ("Coupon").concat(":").concat(coupon.getName()));
592 -// Intent intent = new Intent(LoyaltyWallet.this, CouponInfoActivity.class);
593 -// intent.putExtra("coupon", (Serializable) coupon);
594 -// intent.putExtra("isFromWallet", true);
595 -// startActivityForResult(intent, 1002);
596 -// }
597 -// })
598 -// .doOnError(error -> {
599 -// })
600 -// .subscribe();
601 -// mAdapterCoupons.notifyDataSetChanged();
602 -//// mLlGifts.setVisibility(View.VISIBLE);
603 -// } else {
604 -// mLlGifts.setVisibility(View.GONE);
605 -// }
606 -// });
607 - /** Coupons List */
608 -
609 - runOnUiThread(() -> {
610 - if (WarplyManagerHelper.getCouponList() != null && WarplyManagerHelper.getCouponList().size() > 0)
611 - mTvGiftsCountBadge.setText(String.valueOf(WarplyManagerHelper.getCouponList().size()));
612 - else
613 - mTvGiftsCountBadge.setText("0");
614 - checkForEmpty();
615 - });
616 - }
617 - }
618 -
619 -// @Override
620 -// protected void attachBaseContext(Context newBase) {
621 -// super.attachBaseContext(ViewPumpContextWrapper.wrap(newBase));
622 -// }
623 -
624 - // ===========================================================
625 - // Methods
626 - // ===========================================================
627 -
628 - private void initViews() {
629 - if (WarpUtils.getUserNonTelco(this)) {
630 - nonTelcoDialog();
631 - }
632 -
633 - /** Unified Coupons List */
634 -// if (WarplyManagerHelper.getMarketCouponsList() != null && WarplyManagerHelper.getMarketCouponsList().size() > 0) {
635 -// ArrayList<UnifiedCoupon> unilist = new ArrayList<UnifiedCoupon>();
636 -// for (UnifiedCoupon unicpn : WarplyManagerHelper.getMarketCouponsList()) {
637 -// SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
638 -// Date newDate = new Date();
639 -// try {
640 -// newDate = simpleDateFormat.parse(unicpn.getCreated());
641 -// } catch (ParseException e) {
642 -// e.printStackTrace();
643 -// }
644 -// unicpn.setExpirationDate(newDate);
645 -// unilist.add(unicpn);
646 -// }
647 -//
648 -// Collections.sort(unilist, (coupon1, coupon2) -> coupon2.getExpirationDate().compareTo(coupon1.getExpirationDate()));
649 -//
650 -// mAdapterMarketCoupons = new MarketCouponAdapter(this, unilist);
651 -// mRvMarketCoupons.setAdapter(mAdapterMarketCoupons);
652 -// mAdapterMarketCoupons.getPositionClicks()
653 -// .doOnNext(coupon -> {
654 -// if (!mUnifiedPressed) {
655 -// mUnifiedPressed = true;
656 -// WarplyAnalyticsManager.logTrackersEvent(this, "click", ("UnifiedCoupon").concat(":").concat(coupon.getBarcode()));
657 -// Intent intent = new Intent(LoyaltyWallet.this, UnifiedCouponInfoActivity.class);
658 -// intent.putExtra("coupon", (Serializable) coupon);
659 -// intent.putExtra("isFromWallet", true);
660 -// startActivity(intent);
661 -// }
662 -//// startActivityForResult(intent, 1002);
663 -// })
664 -// .doOnError(error -> {
665 -// })
666 -// .subscribe();
667 -// mLlMarketView.setVisibility(View.VISIBLE);
668 -// } else {
669 -// mLlMarketView.setVisibility(View.GONE);
670 -// }
671 -
672 - if (WarplyManagerHelper.getMarketCouponsList() != null && WarplyManagerHelper.getMarketCouponsList().size() > 0)
673 - mTvUnifiedCountBadge.setText(String.valueOf(WarplyManagerHelper.getMarketCouponsList().size()));
674 - else
675 - mTvUnifiedCountBadge.setText("0");
676 - /** Unified Coupons List */
677 -
678 - /** Coupon List */
679 -// if (WarplyManagerHelper.getCouponList() != null && WarplyManagerHelper.getCouponList().size() > 0) {
680 -// CouponList cpnlist = new CouponList();
681 -// for (Coupon cpn : WarplyManagerHelper.getCouponList()) {
682 -// if (cpn.getStatus() == 1) {
683 -// SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd hh:mm");
684 -// Date newDate = new Date();
685 -// try {
686 -// newDate = simpleDateFormat.parse(cpn.getExpiration());
687 -// } catch (ParseException e) {
688 -// e.printStackTrace();
689 -// }
690 -// cpn.setExpirationDate(newDate);
691 -// cpnlist.add(cpn);
692 -// }
693 -// }
694 -//
695 -// Collections.sort(cpnlist, (coupon1, coupon2) -> coupon1.getExpirationDate().compareTo(coupon2.getExpirationDate()));
696 -//
697 -// mRecyclerCoupons.setNestedScrollingEnabled(false);
698 -// mRecyclerCoupons.setLayoutManager(new LinearLayoutManager(this, LinearLayoutManager.VERTICAL, false));
699 -// mAdapterCoupons = new ActiveCouponAdapter(this, cpnlist);
700 -// mRecyclerCoupons.setAdapter(mAdapterCoupons);
701 -// mAdapterCoupons.getPositionClicks()
702 -// .doOnNext(coupon -> {
703 -// if (!mCouponPressed) {
704 -// mCouponPressed = true;
705 -// WarplyAnalyticsManager.logTrackersEvent(this, "click", ("Coupon").concat(":").concat(coupon.getName()));
706 -// Intent intent = new Intent(LoyaltyWallet.this, CouponInfoActivity.class);
707 -// intent.putExtra("coupon", (Serializable) coupon);
708 -// intent.putExtra("isFromWallet", true);
709 -// startActivityForResult(intent, 1002);
710 -// }
711 -// })
712 -// .doOnError(error -> {
713 -// })
714 -// .subscribe();
715 -// mLlGifts.setVisibility(View.VISIBLE);
716 -// } else {
717 -// mLlGifts.setVisibility(View.GONE);
718 -// }
719 -
720 - if (WarplyManagerHelper.getCouponList() != null && WarplyManagerHelper.getCouponList().size() > 0)
721 - mTvGiftsCountBadge.setText(String.valueOf(WarplyManagerHelper.getCouponList().size()));
722 - else
723 - mTvGiftsCountBadge.setText("0");
724 - /** Coupon List */
725 -
726 - /** First Expandable Banner */
727 -// String badgeValueFirst = String.format("%.02f", WarplyManagerHelper.getDealsCouponsSum());
728 -// mTvDealsValue.setText(String.format(getString(R.string.cos_value), badgeValueFirst));
729 -// if (String.valueOf(WarplyManagerHelper.getDealsCouponsSum()).length() >= 3) {
730 -// mTvDealsValue.setTextSize(12);
731 -// } else {
732 -// mTvDealsValue.setTextSize(14);
733 -// }
734 -// SpannableStringBuilder sBuilder = new SpannableStringBuilder();
735 -// sBuilder.append(String.format(getString(R.string.cos_deals_win_title_cos), badgeValueFirst));
736 -// CalligraphyTypefaceSpan typefaceBoldSpanFirst = new CalligraphyTypefaceSpan(TypefaceUtils.load(getAssets(), "fonts/PeridotPE-Bold.ttf"));
737 -// sBuilder.setSpan(typefaceBoldSpanFirst, 15, 16 + badgeValueFirst.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
738 -// mTvDealsValueAll.setText(sBuilder, TextView.BufferType.SPANNABLE);
739 -// mFavValue += WarplyManagerHelper.getDealsCouponsSum();
740 - /** First Expandable Banner */
741 -
742 - /** Second Expandable Banner */
743 -// if (WarplyManagerHelper.getLoyaltyBadge() != null && (WarplyManagerHelper.getLoyaltyBadge().getCouponCount() > 0 || WarplyManagerHelper.getLoyaltyBadge().getCouponCount() == 0)) {
744 -// String badgeValue = String.format("%.02f", WarplyManagerHelper.getLoyaltyBadge().getValue());
745 -// mTvGiftsValue.setText(String.format(getString(R.string.cos_value), badgeValue));
746 -// if (String.valueOf(WarplyManagerHelper.getLoyaltyBadge().getValue()).length() >= 3) {
747 -// mTvGiftsValue.setTextSize(12);
748 -// } else {
749 -// mTvGiftsValue.setTextSize(14);
750 -// }
751 -// SpannableStringBuilder sBuilderSecond = new SpannableStringBuilder();
752 -// sBuilderSecond.append(String.format(getString(R.string.cos_deals_win_title), badgeValue));
753 -// CalligraphyTypefaceSpan typefaceBoldSpanSecond = new CalligraphyTypefaceSpan(TypefaceUtils.load(getAssets(), "fonts/PeridotPE-Bold.ttf"));
754 -// sBuilderSecond.setSpan(typefaceBoldSpanSecond, 15, 16 + badgeValue.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
755 -// mTvGiftsValueAll.setText(sBuilderSecond, TextView.BufferType.SPANNABLE);
756 -// mFavValue += WarplyManagerHelper.getLoyaltyBadge().getValue();
757 -// }
758 - /** Second Expandable Banner */
759 -
760 - /** Third Expandable Banner */
761 -// if (WarplyManagerHelper.getMarketCoupons() != null && WarplyManagerHelper.getMarketCoupons().size() > 0) {
762 -// countValue = 0.0f;
763 -//// for (UnifiedCoupon unicou : WarplyManagerHelper.getMarketCoupons()) {
764 -//// if (unicou.getCoupons() != null && unicou.getCoupons().size() > 0) {
765 -//// for (Coupon inncou : unicou.getCoupons()) {
766 -//// if (inncou.getStatus() == 0) {
767 -//// countValue += Float.valueOf(inncou.getDiscount());
768 -//// }
769 -//// }
770 -//// }
771 -//// }
772 -//
773 -// if (WarplyManagerHelper.getCouponRedeemedList().size() > 0) {
774 -// if (WarplyManagerHelper.getCouponsetsDeals().size() > 0) {
775 -// for (Couponset couset : WarplyManagerHelper.getCouponsetsDeals()) {
776 -// for (Coupon cou : WarplyManagerHelper.getCouponRedeemedList()) {
777 -// if (cou.getCouponsetUuid().equals(couset.getUuid())) {
778 -// countValue += Float.valueOf(cou.getDiscount());
779 -// cou.setDescription(couset.getShortDescription());
780 -// cou.setImage(couset.getImgPreview());
781 -// cou.setName(couset.getName());
782 -// cou.setMerchantUuid(couset.getMerchantUuid());
783 -// cou.setInnerText(couset.getInnerText());
784 -// cou.setDiscount_type(couset.getDiscount_type());
785 -// cou.setFinal_price(couset.getFinal_price());
786 -// break;
787 -// }
788 -// }
789 -// }
790 -// }
791 -// }
792 -//
793 -// mFavValue += countValue;
794 -// String badgeValue = String.format("%.02f", countValue);
795 -// mTvMarketValue.setText(String.format(getString(R.string.cos_value), badgeValue));
796 -// if (String.valueOf(countValue).length() >= 3) {
797 -// mTvMarketValue.setTextSize(12);
798 -// } else {
799 -// mTvMarketValue.setTextSize(14);
800 -// }
801 -// SpannableStringBuilder sBuilderThird = new SpannableStringBuilder();
802 -// sBuilderThird.append(String.format(getString(R.string.cos_supermarket_win), badgeValue));
803 -// CalligraphyTypefaceSpan typefaceBoldSpanThird = new CalligraphyTypefaceSpan(TypefaceUtils.load(getAssets(), "fonts/PeridotPE-Bold.ttf"));
804 -// sBuilderThird.setSpan(typefaceBoldSpanThird, 15, 16 + badgeValue.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
805 -// mTvMarketAll.setText(sBuilderThird, TextView.BufferType.SPANNABLE);
806 -// } else {
807 -// String badgeValue = String.format("%.02f", 0.0f);
808 -// mTvMarketValue.setText(String.format(getString(R.string.cos_value), badgeValue));
809 -// SpannableStringBuilder sBuilderThird = new SpannableStringBuilder();
810 -// sBuilderThird.append(String.format(getString(R.string.cos_supermarket_win), badgeValue));
811 -// CalligraphyTypefaceSpan typefaceBoldSpanThird = new CalligraphyTypefaceSpan(TypefaceUtils.load(getAssets(), "fonts/PeridotPE-Bold.ttf"));
812 -// sBuilderThird.setSpan(typefaceBoldSpanThird, 15, 16 + badgeValue.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
813 -// mTvMarketAll.setText(sBuilderThird, TextView.BufferType.SPANNABLE);
814 -// }
815 - /** Third Expandable Banner */
816 -
817 - /** Sum Expandable Banner */
818 -// String allValue = String.format("%.02f", mFavValue);
819 -// mTvFavValue.setText(String.format(getString(R.string.cos_value), allValue));
820 -// if (String.valueOf(mFavValue).length() >= 3) {
821 -// mTvFavValue.setTextSize(12);
822 -// } else {
823 -// mTvFavValue.setTextSize(14);
824 -// }
825 -// SpannableStringBuilder sBuilderExp = new SpannableStringBuilder();
826 -// sBuilderExp.append(String.format(getString(R.string.cos_for_you_all), allValue));
827 -// CalligraphyTypefaceSpan typefaceBoldExp = new CalligraphyTypefaceSpan(TypefaceUtils.load(getAssets(), "fonts/PeridotPE-Bold.ttf"));
828 -// sBuilderExp.setSpan(typefaceBoldExp, 26, 27 + allValue.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
829 -// mTvFavValueAll.setText(sBuilderExp, TextView.BufferType.SPANNABLE);
830 -// mClExp.setVisibility(View.VISIBLE);
831 - /** Sum Expandable Banner */
832 -
833 - /** Deals Badge */
834 -// if (WarplyManagerHelper.getActiveDFYCoupons() != null && WarplyManagerHelper.getActiveDFYCoupons().size() > 0) {
835 -// String codes = "";
836 -// if (WarplyManagerHelper.getActiveDFYCoupons().size() == 1) {
837 -// codes = WarplyManagerHelper.getActiveDFYCoupons().get(0).getCode();
838 -// mTvActiveTitle.setText(String.format(getString(R.string.cos_active_deals), String.valueOf(1)));
839 -//
840 -// SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd hh:mm");
841 -// String date1 = WarplyManagerHelper.getActiveDFYCoupons().get(0).getDate();
842 -// String date2 = dateFormat.format(new Date());
843 -//
844 -// mTvActiveCode.setText(codes);
845 -//
846 -// try {
847 -// Date toDate = dateFormat.parse(date2);
848 -// Date fromDate = dateFormat.parse(date1);
849 -// long diff = TimeUnit.MILLISECONDS.toDays(fromDate.getTime() - toDate.getTime()) + 1;
850 -// mTvActiveDate.setText(String.format(getString(R.string.cos_active_coupon_date), String.valueOf(diff)));
851 -// mTvActiveDate.setVisibility(View.VISIBLE);
852 -// } catch (ParseException e) {
853 -// e.printStackTrace();
854 -// }
855 -// } else {
856 -//// for (ActiveDFYCouponModel coupon : WarplyManagerHelper.getActiveDFYCoupons()) {
857 -//// codes = codes + coupon.getCode() + ",";
858 -//// }
859 -//// codes = codes.substring(0, codes.length() - 1);
860 -//
861 -// mTvActiveTitle.setText(String.format(getString(R.string.cos_active_deals_plural), String.valueOf(WarplyManagerHelper.getActiveDFYCoupons().size())));
862 -// mTvActiveCode.setVisibility(View.GONE);
863 -//
864 -//// Collections.reverse(WarplyManagerHelper.getActiveDFYCoupons());
865 -// for (int i = 0; i < WarplyManagerHelper.getActiveDFYCoupons().size(); i++) {
866 -// LayoutInflater vi = (LayoutInflater) getApplicationContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
867 -// LinearLayout v = (LinearLayout) vi.inflate(R.layout.item_selectable, null);
868 -// TextView textView = (TextView) v.findViewById(R.id.tv_code_copy);
869 -// TextView textViewComma = (TextView) v.findViewById(R.id.tv_code_comma);
870 -// CalligraphyTypefaceSpan typefaceBoldSpanDFY = new CalligraphyTypefaceSpan(TypefaceUtils.load(getAssets(), "fonts/PeridotPE-Bold.ttf"));
871 -// SpannableStringBuilder sBuilderDFY = new SpannableStringBuilder(WarplyManagerHelper.getActiveDFYCoupons().get(i).getCode());
872 -// SpannableStringBuilder sBuilderComma = new SpannableStringBuilder(getString(R.string.cos_comma));
873 -// sBuilderDFY.setSpan(typefaceBoldSpanDFY, 0, sBuilderDFY.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
874 -// sBuilderComma.setSpan(typefaceBoldSpanDFY, 0, sBuilderComma.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
875 -// textView.setText(sBuilderDFY, TextView.BufferType.SPANNABLE);
876 -// textView.setTextIsSelectable(true);
877 -// textViewComma.setText(sBuilderComma, TextView.BufferType.SPANNABLE);
878 -// mLlActiveCodesView.addView(v, 0, new ViewGroup.LayoutParams(
879 -// ViewGroup.LayoutParams.WRAP_CONTENT,
880 -// ViewGroup.LayoutParams.WRAP_CONTENT));
881 -// }
882 -//
883 -// mScActiveCodes.setVisibility(View.VISIBLE);
884 -// mLlActiveCodesView.setVisibility(View.VISIBLE);
885 -// }
886 -//// mTvActiveCode.setText(codes);
887 -// mLlDeals.setVisibility(View.VISIBLE);
888 -// } else {
889 -// mLlDeals.setVisibility(View.GONE);
890 -// }
891 -
892 - if (WarplyManagerHelper.getActiveDFYCoupons() != null)
893 - mTvDealsCountBadge.setText(String.valueOf(WarplyManagerHelper.getActiveDFYCoupons().size()));
894 - else
895 - mTvDealsCountBadge.setText("0");
896 - /** Deals Badge */
897 -
898 - if (WarplyManagerHelper.getConsumer() != null) {
899 - mTvUsername.setText(String.format(getResources().getString(R.string.cos_profile_loyalty_name),
900 - WarplyManagerHelper.getConsumer().getFirstName(), WarplyManagerHelper.getConsumer().getLastName()));
901 -
902 - if (!TextUtils.isEmpty(WarplyManagerHelper.getConsumer().getImageUrl()) && !WarplyManagerHelper.getConsumer().getImageUrl().equals("null")) {
903 - Glide.with(this)
904 - .load(WarplyManagerHelper.getConsumer().getImageUrl())
905 - .diskCacheStrategy(DiskCacheStrategy.DATA)
906 - .into(mIvProfilePhoto);
907 - } else {
908 - Glide.with(this)
909 - .load(R.drawable.ic_default_photo)
910 - .into(mIvProfilePhoto);
911 - }
912 -
913 - if (!TextUtils.isEmpty(WarplyManagerHelper.getUserTag(this))) {
914 - mTvUserBadge.setText(WarplyManagerHelper.getUserTag(this));
915 - mLlQuestionnaire.setVisibility(View.GONE);
916 - mLlUserBadge.setVisibility(View.VISIBLE);
917 - } else {
918 - mLlUserBadge.setVisibility(View.GONE);
919 - mLlQuestionnaire.setVisibility(View.VISIBLE);
920 - }
921 - }
922 -
923 - /** Expandable Banner */
924 -// if (mLlMarketView.getVisibility() == View.GONE
925 -// && WarplyManagerHelper.getDealsCouponsSum() == 0
926 -// && (WarplyManagerHelper.getLoyaltyBadge() != null && WarplyManagerHelper.getLoyaltyBadge().getCouponCount() == 0)
927 -// && countValue == 0) {
928 -// mIvExpArrow.setVisibility(View.GONE);
929 -//// mLlEmptyWallet.setVisibility(View.VISIBLE);
930 -// mIsStayCollapsed = true;
931 -// } else {
932 -// mIvExpArrow.setVisibility(View.VISIBLE);
933 -// mIsStayCollapsed = false;
934 -// }
935 - /** Expandable Banner */
936 -
937 - /** Empty View */
938 - checkForEmpty();
939 - /** Empty View */
940 -
941 - mIvBack.setOnClickListener(this);
942 - mLlQuestionnaire.setOnClickListener(this);
943 - mLlUserBadge.setOnClickListener(this);
944 - mClDealsBanner.setOnClickListener(this);
945 - mClGiftsBanner.setOnClickListener(this);
946 - mClDealsView.setOnClickListener(this);
947 - mSvLoyaltyWallet.setOnScrollChangeListener(this);
948 - mClExp.setOnClickListener(this);
949 - mClMarket.setOnClickListener(this);
950 - mLlHistory.setOnClickListener(this);
951 - mRlDeals.setOnClickListener(this);
952 - mRlUnified.setOnClickListener(this);
953 - mRlGifts.setOnClickListener(this);
954 - mCvVouchers.setOnClickListener(this);
955 - mCvVouchersDisabled.setOnClickListener(this);
956 - }
957 -
958 - private void nonTelcoDialog() {
959 - if (!isFinishing()) {
960 - mAlertDialogNonTelco = new AlertDialog.Builder(this)
961 - .setTitle(R.string.cos_dlg_non_telco_title)
962 - .setMessage(R.string.cos_dlg_non_telco)
963 - .setPositiveButton(R.string.cos_dlg_positive_button2, (dialogPositive, whichPositive) -> {
964 - dialogPositive.dismiss();
965 - onBackPressed();
966 - })
967 - .setCancelable(false)
968 - .show();
969 - }
970 - }
971 -
972 - private void vouchersServiceUnavailableDialog() {
973 - if (!isFinishing()) {
974 - mLlVouchersSpinner.setVisibility(View.GONE);
975 - mAlertDialogVouchersService = new AlertDialog.Builder(this)
976 - .setTitle(R.string.cos_dlg_try_again)
977 - .setMessage(R.string.cos_dlg_service_unavailable)
978 - .setPositiveButton(R.string.cos_dlg_return, (dialogPositive, whichPositive) -> {
979 - dialogPositive.dismiss();
980 - onBackPressed();
981 - })
982 - .setCancelable(false)
983 - .show();
984 - }
985 - }
986 -
987 - private void checkForEmpty() {
988 - if (TextUtils.isEmpty(WarplyManagerHelper.getShowVouchersBanner()) || (!TextUtils.isEmpty(WarplyManagerHelper.getShowVouchersBanner()) && WarplyManagerHelper.getShowVouchersBanner().equals("null"))) {
989 - /** Show spinner only if empty */
990 - mLlVouchers.setVisibility(View.GONE);
991 - mSeparator.setVisibility(View.VISIBLE);
992 - if (TextUtils.isEmpty(WarplyManagerHelper.getShowVouchersBanner()))
993 - mLlVouchersSpinner.setVisibility(View.VISIBLE);
994 - if (!TextUtils.isEmpty(WarplyManagerHelper.getShowVouchersBanner()) && WarplyManagerHelper.getShowVouchersBanner().equals("null"))
995 - mLlVouchersSpinner.setVisibility(View.GONE);
996 - if ((WarplyManagerHelper.getActiveDFYCoupons() != null && WarplyManagerHelper.getActiveDFYCoupons().size() == 0)
997 - && (WarplyManagerHelper.getMarketCouponsList() != null && WarplyManagerHelper.getMarketCouponsList().size() == 0)
998 - && (WarplyManagerHelper.getCouponList() != null && WarplyManagerHelper.getCouponList().size() == 0)) {
999 - /** Hide all and show empty view */
1000 - mLlVouchers.setVisibility(View.GONE);
1001 - mLlVouchersSpinner.setVisibility(View.GONE);
1002 - mSeparator.setVisibility(View.VISIBLE);
1003 - mLlEmptyWallet.setVisibility(View.VISIBLE);
1004 - } else {
1005 - /** Show loyalty banners and hide empty view
1006 - * Show spinner only if empty */
1007 - mLlEmptyWallet.setVisibility(View.GONE);
1008 - mLlBannerInfo.setVisibility(View.VISIBLE);
1009 - }
1010 - } else {
1011 - if (WarplyManagerHelper.getShowVouchersBanner().equals("true")) {
1012 - /** Hide spinner and hide empty view and show vouchers and hide disabled vouchers */
1013 - mLlVouchersSpinner.setVisibility(View.GONE);
1014 - mLlEmptyWallet.setVisibility(View.GONE);
1015 - if (TextUtils.isEmpty(WarpUtils.getLanguage(this)) || WarpUtils.getLanguage(this).equals("el")) {
1016 - mTvVouchersTitle.setText(getString(R.string.cos_vouchers_title));
1017 - mTvVouchersSubtitle.setText(getString(R.string.cos_vouchers_info_title));
1018 - } else {
1019 - mTvVouchersTitle.setText(getString(R.string.cos_vouchers_title_en));
1020 - mTvVouchersSubtitle.setText(getString(R.string.cos_vouchers_info_title_en));
1021 - }
1022 - mLlVouchers.setVisibility(View.VISIBLE);
1023 - mLlVouchersDisabled.setVisibility(View.GONE);
1024 - mSeparatorDisabled.setVisibility(View.VISIBLE);
1025 - if ((WarplyManagerHelper.getActiveDFYCoupons() != null && WarplyManagerHelper.getActiveDFYCoupons().size() == 0)
1026 - && (WarplyManagerHelper.getMarketCouponsList() != null && WarplyManagerHelper.getMarketCouponsList().size() == 0)
1027 - && (WarplyManagerHelper.getCouponList() != null && WarplyManagerHelper.getCouponList().size() == 0)) {
1028 - /** Hide loyalty banners and hide separator */
1029 - mSeparator.setVisibility(View.GONE);
1030 - mLlBannerInfo.setVisibility(View.GONE);
1031 - } else {
1032 - /** Show loyalty banners and show separator */
1033 - mSeparator.setVisibility(View.VISIBLE);
1034 - mLlBannerInfo.setVisibility(View.VISIBLE);
1035 - }
1036 - } else if (WarplyManagerHelper.getShowVouchersBanner().equals("false")) {
1037 - /** Hide spinner and hide vouchers and hide empty view and show disabled vouchers and show disabled separator */
1038 - mLlVouchersSpinner.setVisibility(View.GONE);
1039 - mLlEmptyWallet.setVisibility(View.GONE);
1040 - mLlVouchers.setVisibility(View.GONE);
1041 - mSeparator.setVisibility(View.VISIBLE);
1042 - if (TextUtils.isEmpty(WarpUtils.getLanguage(this)) || WarpUtils.getLanguage(this).equals("el")) {
1043 - mTvVouchersDisabledTitle.setText(getString(R.string.cos_vouchers_title));
1044 - mTvVouchersDisabledSubtitle.setText(getString(R.string.cos_vouchers_info_title_disabled));
1045 - } else {
1046 - mTvVouchersDisabledTitle.setText(getString(R.string.cos_vouchers_title_en));
1047 - mTvVouchersDisabledSubtitle.setText(getString(R.string.cos_vouchers_info_title_disabled_en));
1048 - }
1049 - mLlVouchersDisabled.setVisibility(View.VISIBLE);
1050 - mSeparatorDisabled.setVisibility(View.VISIBLE);
1051 - if ((WarplyManagerHelper.getActiveDFYCoupons() != null && WarplyManagerHelper.getActiveDFYCoupons().size() == 0)
1052 - && (WarplyManagerHelper.getMarketCouponsList() != null && WarplyManagerHelper.getMarketCouponsList().size() == 0)
1053 - && (WarplyManagerHelper.getCouponList() != null && WarplyManagerHelper.getCouponList().size() == 0)) {
1054 - /** Hide loyalty banners and hide empty view and hide disabled separator */
1055 - mLlBannerInfo.setVisibility(View.GONE);
1056 - mLlEmptyWallet.setVisibility(View.GONE);
1057 - mSeparatorDisabled.setVisibility(View.GONE);
1058 - } else {
1059 - /** Show loyalty banners and show disabled separator */
1060 - mLlBannerInfo.setVisibility(View.VISIBLE);
1061 - mSeparatorDisabled.setVisibility(View.VISIBLE);
1062 - }
1063 - }
1064 - }
1065 - }
1066 -
1067 - // ===========================================================
1068 - // Inner and Anonymous Classes
1069 - // ===========================================================
1070 -
1071 -}
...@@ -52,7 +52,6 @@ import java.util.List; ...@@ -52,7 +52,6 @@ import java.util.List;
52 import java.util.Map; 52 import java.util.Map;
53 import java.util.concurrent.TimeUnit; 53 import java.util.concurrent.TimeUnit;
54 54
55 -import ly.warp.sdk.BuildConfig;
56 import ly.warp.sdk.Warply; 55 import ly.warp.sdk.Warply;
57 import ly.warp.sdk.dexter.listener.DexterError; 56 import ly.warp.sdk.dexter.listener.DexterError;
58 import ly.warp.sdk.dexter.listener.PermissionDeniedResponse; 57 import ly.warp.sdk.dexter.listener.PermissionDeniedResponse;
...@@ -102,11 +101,9 @@ public class UpdateUserLocationService extends Worker { ...@@ -102,11 +101,9 @@ public class UpdateUserLocationService extends Worker {
102 PermissionsUtil.PERMISSION_LOCATION_FINE 101 PermissionsUtil.PERMISSION_LOCATION_FINE
103 ).requestPermissions(); 102 ).requestPermissions();
104 } catch (SecurityException e) { 103 } catch (SecurityException e) {
105 - if (BuildConfig.DEBUG) {
106 e.printStackTrace(); 104 e.printStackTrace();
107 WorkManager.getInstance(Warply.getWarplyContext()).cancelAllWorkByTag(TAG); 105 WorkManager.getInstance(Warply.getWarplyContext()).cancelAllWorkByTag(TAG);
108 } 106 }
109 - }
110 } else { 107 } else {
111 WorkManager.getInstance(Warply.getWarplyContext()).cancelAllWorkByTag(TAG); 108 WorkManager.getInstance(Warply.getWarplyContext()).cancelAllWorkByTag(TAG);
112 } 109 }
...@@ -187,7 +184,6 @@ public class UpdateUserLocationService extends Worker { ...@@ -187,7 +184,6 @@ public class UpdateUserLocationService extends Worker {
187 getGeofences().add(new WarpGeoFence(geoArray.getJSONObject(i))); 184 getGeofences().add(new WarpGeoFence(geoArray.getJSONObject(i)));
188 } 185 }
189 } catch (JSONException e) { 186 } catch (JSONException e) {
190 - if (BuildConfig.DEBUG)
191 e.printStackTrace(); 187 e.printStackTrace();
192 geofences = null; 188 geofences = null;
193 WarpUtils.log("failed during parsing geofencing data."); 189 WarpUtils.log("failed during parsing geofencing data.");
...@@ -427,10 +423,8 @@ public class UpdateUserLocationService extends Worker { ...@@ -427,10 +423,8 @@ public class UpdateUserLocationService extends Worker {
427 WarpUtils.log("Could not get location data."); 423 WarpUtils.log("Could not get location data.");
428 }); 424 });
429 } catch (SecurityException e) { 425 } catch (SecurityException e) {
430 - if (BuildConfig.DEBUG) {
431 e.printStackTrace(); 426 e.printStackTrace();
432 } 427 }
433 } 428 }
434 - }
435 }; 429 };
436 } 430 }
......
...@@ -38,7 +38,6 @@ import androidx.work.WorkManager; ...@@ -38,7 +38,6 @@ import androidx.work.WorkManager;
38 38
39 import java.util.List; 39 import java.util.List;
40 40
41 -import ly.warp.sdk.BuildConfig;
42 import ly.warp.sdk.Warply; 41 import ly.warp.sdk.Warply;
43 import ly.warp.sdk.dexter.listener.DexterError; 42 import ly.warp.sdk.dexter.listener.DexterError;
44 import ly.warp.sdk.dexter.listener.PermissionDeniedResponse; 43 import ly.warp.sdk.dexter.listener.PermissionDeniedResponse;
...@@ -122,11 +121,9 @@ public class WarplyLocationManager { ...@@ -122,11 +121,9 @@ public class WarplyLocationManager {
122 defaultMinTime, defaultMinDistance, 121 defaultMinTime, defaultMinDistance,
123 locationListenerPendingIntent); 122 locationListenerPendingIntent);
124 } catch (SecurityException e) { 123 } catch (SecurityException e) {
125 - if (BuildConfig.DEBUG) {
126 e.printStackTrace(); 124 e.printStackTrace();
127 } 125 }
128 } 126 }
129 - }
130 }; 127 };
131 128
132 try { 129 try {
...@@ -137,7 +134,6 @@ public class WarplyLocationManager { ...@@ -137,7 +134,6 @@ public class WarplyLocationManager {
137 PermissionsUtil.PERMISSION_LOCATION_FINE 134 PermissionsUtil.PERMISSION_LOCATION_FINE
138 ).requestPermissions(); 135 ).requestPermissions();
139 } catch (Exception e) { 136 } catch (Exception e) {
140 - if (BuildConfig.DEBUG)
141 e.printStackTrace(); 137 e.printStackTrace();
142 } 138 }
143 } 139 }
...@@ -262,11 +258,9 @@ public class WarplyLocationManager { ...@@ -262,11 +258,9 @@ public class WarplyLocationManager {
262 lm.requestLocationUpdates(bestProvider, minTime, minDistance, locationListenerPendingIntent); 258 lm.requestLocationUpdates(bestProvider, minTime, minDistance, locationListenerPendingIntent);
263 } 259 }
264 } catch (SecurityException e) { 260 } catch (SecurityException e) {
265 - if (BuildConfig.DEBUG) {
266 e.printStackTrace(); 261 e.printStackTrace();
267 } 262 }
268 } 263 }
269 - }
270 }; 264 };
271 265
272 new PermissionsUtil( 266 new PermissionsUtil(
...@@ -276,12 +270,10 @@ public class WarplyLocationManager { ...@@ -276,12 +270,10 @@ public class WarplyLocationManager {
276 PermissionsUtil.PERMISSION_LOCATION_FINE 270 PermissionsUtil.PERMISSION_LOCATION_FINE
277 ).requestPermissions(); 271 ).requestPermissions();
278 } catch (SecurityException e) { 272 } catch (SecurityException e) {
279 - if (BuildConfig.DEBUG) {
280 e.printStackTrace(); 273 e.printStackTrace();
281 } 274 }
282 } 275 }
283 } 276 }
284 - }
285 277
286 // MicroAppIndexes geofencingIndex = MicroAppIndexes.GEOFENCING_INDEX; 278 // MicroAppIndexes geofencingIndex = MicroAppIndexes.GEOFENCING_INDEX;
287 // 279 //
......
...@@ -16,7 +16,6 @@ import android.widget.ImageView; ...@@ -16,7 +16,6 @@ import android.widget.ImageView;
16 import android.widget.RelativeLayout; 16 import android.widget.RelativeLayout;
17 17
18 18
19 -import ly.warp.sdk.BuildConfig;
20 import ly.warp.sdk.io.models.Campaign; 19 import ly.warp.sdk.io.models.Campaign;
21 import ly.warp.sdk.utils.WarpUtils; 20 import ly.warp.sdk.utils.WarpUtils;
22 import ly.warp.sdk.utils.WarplyDeviceInfoCollector; 21 import ly.warp.sdk.utils.WarplyDeviceInfoCollector;
...@@ -117,11 +116,9 @@ public class CampaignItemWebHolder extends CampaignItemViewHolder { ...@@ -117,11 +116,9 @@ public class CampaignItemWebHolder extends CampaignItemViewHolder {
117 try { 116 try {
118 context.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(url))); 117 context.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(url)));
119 } catch (ActivityNotFoundException e) { 118 } catch (ActivityNotFoundException e) {
120 - if (BuildConfig.DEBUG) {
121 e.printStackTrace(); 119 e.printStackTrace();
122 } 120 }
123 } 121 }
124 - }
125 }); 122 });
126 warpView.setOnTouchListener(new View.OnTouchListener() { 123 warpView.setOnTouchListener(new View.OnTouchListener() {
127 @Override 124 @Override
......
1 package ly.warp.sdk.views; 1 package ly.warp.sdk.views;
2 2
3 import android.content.Context; 3 import android.content.Context;
4 +
4 import androidx.fragment.app.Fragment; 5 import androidx.fragment.app.Fragment;
5 import androidx.fragment.app.FragmentActivity; 6 import androidx.fragment.app.FragmentActivity;
6 import androidx.fragment.app.FragmentManager; 7 import androidx.fragment.app.FragmentManager;
7 import androidx.fragment.app.FragmentTransaction; 8 import androidx.fragment.app.FragmentTransaction;
9 +
8 import android.text.TextUtils; 10 import android.text.TextUtils;
9 11
10 -import ly.warp.sdk.BuildConfig;
11 import ly.warp.sdk.Warply; 12 import ly.warp.sdk.Warply;
12 import ly.warp.sdk.fragments.WarpViewFragment; 13 import ly.warp.sdk.fragments.WarpViewFragment;
13 import ly.warp.sdk.io.callbacks.CallbackReceiver; 14 import ly.warp.sdk.io.callbacks.CallbackReceiver;
...@@ -87,12 +88,10 @@ public class CampaignViewLoader implements CallbackReceiver<CampaignList> { ...@@ -87,12 +88,10 @@ public class CampaignViewLoader implements CallbackReceiver<CampaignList> {
87 try { 88 try {
88 transaction.commit(); 89 transaction.commit();
89 } catch (IllegalStateException e) { 90 } catch (IllegalStateException e) {
90 - if (BuildConfig.DEBUG) {
91 e.printStackTrace(); 91 e.printStackTrace();
92 } 92 }
93 } 93 }
94 } 94 }
95 - }
96 95
97 private void notifySuccessExternalListener(CampaignList campaigns) { 96 private void notifySuccessExternalListener(CampaignList campaigns) {
98 97
......
...@@ -35,7 +35,6 @@ import android.content.Context; ...@@ -35,7 +35,6 @@ import android.content.Context;
35 import android.content.DialogInterface; 35 import android.content.DialogInterface;
36 import android.content.Intent; 36 import android.content.Intent;
37 import android.content.IntentSender; 37 import android.content.IntentSender;
38 -import android.content.pm.ApplicationInfo;
39 import android.content.pm.PackageManager; 38 import android.content.pm.PackageManager;
40 import android.location.LocationManager; 39 import android.location.LocationManager;
41 import android.net.Uri; 40 import android.net.Uri;
...@@ -103,12 +102,9 @@ import ly.warp.sdk.io.models.RefreshVouchersEventModel; ...@@ -103,12 +102,9 @@ import ly.warp.sdk.io.models.RefreshVouchersEventModel;
103 import ly.warp.sdk.io.models.UnifiedCoupon; 102 import ly.warp.sdk.io.models.UnifiedCoupon;
104 import ly.warp.sdk.io.models.WarplyCCMSEnabledModel; 103 import ly.warp.sdk.io.models.WarplyCCMSEnabledModel;
105 import ly.warp.sdk.io.models.WarplyCouponsChangedEventModel; 104 import ly.warp.sdk.io.models.WarplyCouponsChangedEventModel;
106 -import ly.warp.sdk.io.models.WarplyHealthEventModel;
107 import ly.warp.sdk.io.models.WarplyPacingCardEventModel; 105 import ly.warp.sdk.io.models.WarplyPacingCardEventModel;
108 -import ly.warp.sdk.io.models.WarplyPacingEventModel;
109 import ly.warp.sdk.io.models.WarplyUnifiedActivatedEventModel; 106 import ly.warp.sdk.io.models.WarplyUnifiedActivatedEventModel;
110 import ly.warp.sdk.services.EventCampaignService; 107 import ly.warp.sdk.services.EventCampaignService;
111 -import ly.warp.sdk.services.WarplyHealthService;
112 import ly.warp.sdk.utils.WarpUtils; 108 import ly.warp.sdk.utils.WarpUtils;
113 import ly.warp.sdk.utils.WarplyManagerHelper; 109 import ly.warp.sdk.utils.WarplyManagerHelper;
114 import ly.warp.sdk.utils.WarplyProperty; 110 import ly.warp.sdk.utils.WarplyProperty;
......
...@@ -10,7 +10,6 @@ import java.util.Collections; ...@@ -10,7 +10,6 @@ import java.util.Collections;
10 import java.util.Comparator; 10 import java.util.Comparator;
11 import java.util.concurrent.atomic.AtomicBoolean; 11 import java.util.concurrent.atomic.AtomicBoolean;
12 12
13 -import ly.warp.sdk.BuildConfig;
14 import ly.warp.sdk.Warply; 13 import ly.warp.sdk.Warply;
15 import ly.warp.sdk.io.callbacks.CallbackReceiver; 14 import ly.warp.sdk.io.callbacks.CallbackReceiver;
16 import ly.warp.sdk.io.callbacks.SimpleCallbackReceiver; 15 import ly.warp.sdk.io.callbacks.SimpleCallbackReceiver;
...@@ -142,10 +141,8 @@ public class CampaignsArrayAdapter<VH extends CampaignItemViewHolder> extends Ba ...@@ -142,10 +141,8 @@ public class CampaignsArrayAdapter<VH extends CampaignItemViewHolder> extends Ba
142 itemView = viewHolder.itemView; 141 itemView = viewHolder.itemView;
143 itemView.setTag(viewHolder); 142 itemView.setTag(viewHolder);
144 } catch (Exception e) { 143 } catch (Exception e) {
145 - if (BuildConfig.DEBUG) {
146 e.printStackTrace(); 144 e.printStackTrace();
147 } 145 }
148 - }
149 } else { 146 } else {
150 viewHolder = (VH) itemView.getTag(); 147 viewHolder = (VH) itemView.getTag();
151 } 148 }
......
1 package ly.warp.sdk.views.adapters.mix; 1 package ly.warp.sdk.views.adapters.mix;
2 2
3 import android.database.DataSetObserver; 3 import android.database.DataSetObserver;
4 +
4 import androidx.annotation.NonNull; 5 import androidx.annotation.NonNull;
5 import androidx.recyclerview.widget.RecyclerView; 6 import androidx.recyclerview.widget.RecyclerView;
7 +
6 import android.view.View; 8 import android.view.View;
7 import android.view.ViewGroup; 9 import android.view.ViewGroup;
8 import android.widget.AbsListView; 10 import android.widget.AbsListView;
9 import android.widget.BaseAdapter; 11 import android.widget.BaseAdapter;
10 import android.widget.ListView; 12 import android.widget.ListView;
11 13
12 -import ly.warp.sdk.BuildConfig;
13 import ly.warp.sdk.io.callbacks.SimpleCallbackReceiver; 14 import ly.warp.sdk.io.callbacks.SimpleCallbackReceiver;
14 import ly.warp.sdk.io.models.Campaign; 15 import ly.warp.sdk.io.models.Campaign;
15 import ly.warp.sdk.io.models.CampaignList; 16 import ly.warp.sdk.io.models.CampaignList;
...@@ -185,10 +186,8 @@ public class CampaignsMixListAdapter<VH extends CampaignItemViewHolder> extends ...@@ -185,10 +186,8 @@ public class CampaignsMixListAdapter<VH extends CampaignItemViewHolder> extends
185 itemView = viewHolder.itemView; 186 itemView = viewHolder.itemView;
186 itemView.setTag(viewHolder); 187 itemView.setTag(viewHolder);
187 } catch (Exception e) { 188 } catch (Exception e) {
188 - if (BuildConfig.DEBUG) {
189 e.printStackTrace(); 189 e.printStackTrace();
190 } 190 }
191 - }
192 } else { 191 } else {
193 viewHolder = (VH) itemView.getTag(); 192 viewHolder = (VH) itemView.getTag();
194 } 193 }
......
1 -<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
2 - xmlns:app="http://schemas.android.com/apk/res-auto"
3 - xmlns:tools="http://schemas.android.com/tools"
4 - android:layout_width="match_parent"
5 - android:layout_height="match_parent"
6 - android:background="@color/cos_light_grey3">
7 -
8 - <androidx.constraintlayout.widget.ConstraintLayout
9 - android:id="@+id/cl_loyalty_wallet_header"
10 - android:layout_width="match_parent"
11 - android:layout_height="64dp"
12 - android:background="@color/white">
13 -
14 - <ImageView
15 - android:id="@+id/iv_back"
16 - android:layout_width="48dp"
17 - android:layout_height="48dp"
18 - android:layout_marginStart="16dp"
19 - android:scaleType="centerInside"
20 - android:src="@drawable/ic_close"
21 - app:layout_constraintBottom_toBottomOf="parent"
22 - app:layout_constraintStart_toStartOf="parent"
23 - app:layout_constraintTop_toTopOf="parent" />
24 -
25 - <TextView
26 - android:layout_width="wrap_content"
27 - android:layout_height="wrap_content"
28 - android:text="@string/cos_profile_title"
29 - android:textColor="@color/cos_light_black"
30 - android:textSize="19sp"
31 - app:layout_constraintBottom_toBottomOf="parent"
32 - app:layout_constraintEnd_toEndOf="parent"
33 - app:layout_constraintStart_toStartOf="parent"
34 - app:layout_constraintTop_toTopOf="parent" />
35 - </androidx.constraintlayout.widget.ConstraintLayout>
36 -
37 - <androidx.core.widget.NestedScrollView
38 - android:id="@+id/sv_loyalty_wallet"
39 - android:layout_width="match_parent"
40 - android:layout_height="match_parent"
41 - android:layout_below="@+id/cl_loyalty_wallet_header"
42 - android:fillViewport="true"
43 - android:overScrollMode="never"
44 - android:scrollbars="none">
45 -
46 - <LinearLayout
47 - android:layout_width="match_parent"
48 - android:layout_height="wrap_content"
49 - android:orientation="vertical">
50 -
51 - <RelativeLayout
52 - android:layout_width="match_parent"
53 - android:layout_height="wrap_content"
54 - android:background="@android:color/white"
55 - android:orientation="vertical">
56 -
57 - <androidx.constraintlayout.widget.ConstraintLayout
58 - android:id="@+id/ll_first_view"
59 - android:layout_width="match_parent"
60 - android:layout_height="wrap_content"
61 - android:paddingHorizontal="16dp"
62 - android:paddingVertical="24dp">
63 -
64 - <com.google.android.material.imageview.ShapeableImageView
65 - android:id="@+id/iv_profile_photo"
66 - android:layout_width="74dp"
67 - android:layout_height="74dp"
68 - android:padding="1dp"
69 - android:src="@drawable/ic_default_photo"
70 - app:layout_constraintBottom_toBottomOf="parent"
71 - app:layout_constraintStart_toStartOf="parent"
72 - app:layout_constraintTop_toTopOf="parent"
73 - app:shapeAppearanceOverlay="@style/ShapeAppearanceProfileImage"
74 - app:strokeColor="@color/cos_grey2"
75 - app:strokeWidth="1dp" />
76 -
77 - <LinearLayout
78 - android:layout_width="0dp"
79 - android:layout_height="wrap_content"
80 - android:layout_marginStart="8dp"
81 - android:orientation="vertical"
82 - app:layout_constraintBottom_toBottomOf="parent"
83 - app:layout_constraintEnd_toEndOf="parent"
84 - app:layout_constraintStart_toEndOf="@+id/iv_profile_photo"
85 - app:layout_constraintTop_toTopOf="parent">
86 -
87 - <TextView
88 - android:id="@+id/tv_profile_name"
89 - android:layout_width="wrap_content"
90 - android:layout_height="wrap_content"
91 - android:layout_marginBottom="4dp"
92 - android:includeFontPadding="false"
93 - android:maxLines="1"
94 - android:textColor="@color/cos_light_black"
95 - android:textSize="22sp"
96 - tools:text="Test Name" />
97 -
98 - <LinearLayout
99 - android:layout_width="match_parent"
100 - android:layout_height="wrap_content"
101 - android:orientation="horizontal">
102 -
103 - <LinearLayout
104 - android:id="@+id/ll_user_badge"
105 - android:layout_width="wrap_content"
106 - android:layout_height="42dp"
107 - android:background="@drawable/selector_button_green_border"
108 - android:gravity="center"
109 - android:visibility="gone"
110 - tools:visibility="gone">
111 -
112 - <TextView
113 - android:id="@+id/tv_type"
114 - android:layout_width="wrap_content"
115 - android:layout_height="wrap_content"
116 - android:layout_marginHorizontal="20dp"
117 - android:includeFontPadding="false"
118 - android:textColor="@color/cos_green12"
119 - android:textSize="16sp"
120 - tools:text="@string/cos_profile_preferences_placeholder" />
121 - </LinearLayout>
122 -
123 - <LinearLayout
124 - android:id="@+id/ll_user_questionnaire"
125 - android:layout_width="160dp"
126 - android:layout_height="42dp"
127 - android:background="@drawable/selector_button_green_border"
128 - android:gravity="center"
129 - android:visibility="gone"
130 - tools:visibility="visible">
131 -
132 - <ImageView
133 - android:layout_width="16dp"
134 - android:layout_height="16dp"
135 - android:layout_marginEnd="4dp"
136 - android:src="@drawable/sv_plus_sign_green" />
137 -
138 - <TextView
139 - android:id="@+id/tv_questionnaire"
140 - android:layout_width="wrap_content"
141 - android:layout_height="wrap_content"
142 - android:includeFontPadding="false"
143 - android:text="@string/cos_profile_preferences"
144 - android:textColor="@color/cos_green12"
145 - android:textSize="16sp" />
146 - </LinearLayout>
147 -
148 - <LinearLayout
149 - android:id="@+id/ll_loyalty_history"
150 - android:layout_width="52dp"
151 - android:layout_height="42dp"
152 - android:layout_marginStart="4dp"
153 - android:background="@drawable/selector_button_green_border"
154 - android:gravity="center"
155 - android:orientation="vertical">
156 -
157 - <ImageView
158 - android:layout_width="16dp"
159 - android:layout_height="16dp"
160 - android:src="@drawable/sv_history" />
161 - </LinearLayout>
162 - </LinearLayout>
163 - </LinearLayout>
164 - </androidx.constraintlayout.widget.ConstraintLayout>
165 - </RelativeLayout>
166 -
167 - <RelativeLayout
168 - android:layout_width="match_parent"
169 - android:layout_height="wrap_content">
170 -
171 - <LinearLayout
172 - android:id="@+id/ll_second_view"
173 - android:layout_width="match_parent"
174 - android:layout_height="match_parent"
175 - android:gravity="center_horizontal"
176 - android:orientation="vertical">
177 -
178 - <LinearLayout
179 - android:id="@+id/ll_banner_info_new"
180 - android:layout_width="match_parent"
181 - android:layout_height="wrap_content"
182 - android:layout_marginHorizontal="14dp"
183 - android:layout_marginTop="16dp"
184 - android:orientation="vertical"
185 - android:visibility="gone"
186 - tools:visibility="visible">
187 -
188 - <TextView
189 - android:id="@+id/tv_coupons_header"
190 - android:layout_width="wrap_content"
191 - android:layout_height="wrap_content"
192 - android:includeFontPadding="false"
193 - android:maxLines="1"
194 - android:text="@string/cos_coupons_loyalty_title"
195 - android:textColor="@color/cos_light_black"
196 - android:textSize="22sp" />
197 -
198 - <androidx.constraintlayout.widget.ConstraintLayout
199 - android:layout_width="match_parent"
200 - android:layout_height="wrap_content"
201 - android:layout_marginTop="18dp">
202 -
203 - <RelativeLayout
204 - android:id="@+id/rv_deals_count"
205 - android:layout_width="0dp"
206 - android:layout_height="104dp"
207 - app:layout_constraintBottom_toBottomOf="parent"
208 - app:layout_constraintEnd_toStartOf="@+id/rv_sm_count"
209 - app:layout_constraintStart_toStartOf="parent"
210 - app:layout_constraintTop_toTopOf="parent">
211 -
212 - <androidx.cardview.widget.CardView
213 - android:id="@+id/cv_deals_count"
214 - android:layout_width="match_parent"
215 - android:layout_height="match_parent"
216 - android:layout_marginHorizontal="2dp"
217 - android:layout_marginVertical="4dp"
218 - app:cardCornerRadius="16dp"
219 - app:cardElevation="2dp">
220 -
221 - <androidx.constraintlayout.widget.ConstraintLayout
222 - android:layout_width="match_parent"
223 - android:layout_height="match_parent"
224 - android:background="@color/cos_green_tr">
225 -
226 - <ImageView
227 - android:id="@+id/iv_deals_logo_count"
228 - android:layout_width="52dp"
229 - android:layout_height="32dp"
230 - android:src="@drawable/sv_deals_logo_redesign"
231 - app:layout_constraintBottom_toTopOf="@+id/v_separator_deals_count"
232 - app:layout_constraintEnd_toEndOf="parent"
233 - app:layout_constraintStart_toStartOf="parent"
234 - app:layout_constraintTop_toTopOf="parent" />
235 -
236 - <View
237 - android:id="@+id/v_separator_deals_count"
238 - android:layout_width="match_parent"
239 - android:layout_height="1dp"
240 - android:layout_marginHorizontal="8dp"
241 - android:background="@color/cos_grey2"
242 - app:layout_constraintBottom_toBottomOf="parent"
243 - app:layout_constraintEnd_toEndOf="parent"
244 - app:layout_constraintStart_toStartOf="parent"
245 - app:layout_constraintTop_toTopOf="parent" />
246 -
247 - <TextView
248 - android:id="@+id/tv_deals_count_title"
249 - android:layout_width="0dp"
250 - android:layout_height="wrap_content"
251 - android:layout_marginHorizontal="8dp"
252 - android:gravity="center"
253 - android:includeFontPadding="false"
254 - android:text="@string/cos_deals_title2"
255 - android:textColor="@color/cos_light_black"
256 - android:textSize="10sp"
257 - app:layout_constraintBottom_toBottomOf="parent"
258 - app:layout_constraintEnd_toEndOf="parent"
259 - app:layout_constraintStart_toStartOf="parent"
260 - app:layout_constraintTop_toBottomOf="@+id/v_separator_deals_count" />
261 - </androidx.constraintlayout.widget.ConstraintLayout>
262 - </androidx.cardview.widget.CardView>
263 -
264 - <LinearLayout
265 - android:layout_width="16dp"
266 - android:layout_height="16dp"
267 - android:layout_alignParentEnd="true"
268 - android:layout_marginTop="4dp"
269 - android:layout_marginEnd="1dp"
270 - android:background="@drawable/shape_cos_counter_orange"
271 - android:gravity="center"
272 - android:orientation="vertical"
273 - android:translationZ="2dp"
274 - app:layout_constraintEnd_toEndOf="parent"
275 - app:layout_constraintTop_toTopOf="parent">
276 -
277 - <TextView
278 - android:id="@+id/tv_deals_count"
279 - android:layout_width="wrap_content"
280 - android:layout_height="16dp"
281 - android:includeFontPadding="false"
282 - android:maxLines="1"
283 - android:textColor="@color/cos_light_black"
284 - android:textSize="12sp"
285 - tools:text="6" />
286 - </LinearLayout>
287 - </RelativeLayout>
288 -
289 - <RelativeLayout
290 - android:id="@+id/rv_sm_count"
291 - android:layout_width="0dp"
292 - android:layout_height="104dp"
293 - android:layout_marginHorizontal="12dp"
294 - app:layout_constraintBottom_toBottomOf="parent"
295 - app:layout_constraintEnd_toStartOf="@+id/rv_gifts_count"
296 - app:layout_constraintStart_toEndOf="@+id/rv_deals_count"
297 - app:layout_constraintTop_toTopOf="parent">
298 -
299 - <androidx.cardview.widget.CardView
300 - android:id="@+id/cv_sm_count"
301 - android:layout_width="match_parent"
302 - android:layout_height="match_parent"
303 - android:layout_marginHorizontal="2dp"
304 - android:layout_marginVertical="4dp"
305 - app:cardCornerRadius="16dp"
306 - app:cardElevation="2dp">
307 -
308 - <androidx.constraintlayout.widget.ConstraintLayout
309 - android:layout_width="match_parent"
310 - android:layout_height="match_parent"
311 - android:background="@color/cos_creme">
312 -
313 - <ImageView
314 - android:id="@+id/iv_sm_logo_count"
315 - android:layout_width="32dp"
316 - android:layout_height="32dp"
317 - android:src="@drawable/sv_unified_redesign"
318 - app:layout_constraintBottom_toTopOf="@+id/v_separator_sm_count"
319 - app:layout_constraintEnd_toEndOf="parent"
320 - app:layout_constraintStart_toStartOf="parent"
321 - app:layout_constraintTop_toTopOf="parent" />
322 -
323 - <View
324 - android:id="@+id/v_separator_sm_count"
325 - android:layout_width="match_parent"
326 - android:layout_height="1dp"
327 - android:layout_marginHorizontal="8dp"
328 - android:background="@color/cos_grey2"
329 - app:layout_constraintBottom_toBottomOf="parent"
330 - app:layout_constraintEnd_toEndOf="parent"
331 - app:layout_constraintStart_toStartOf="parent"
332 - app:layout_constraintTop_toTopOf="parent" />
333 -
334 - <TextView
335 - android:id="@+id/tv_sm_count_title"
336 - android:layout_width="0dp"
337 - android:layout_height="wrap_content"
338 - android:layout_marginHorizontal="8dp"
339 - android:gravity="center"
340 - android:includeFontPadding="false"
341 - android:text="@string/cos_market_title"
342 - android:textColor="@color/cos_light_black"
343 - android:textSize="10sp"
344 - app:layout_constraintBottom_toBottomOf="parent"
345 - app:layout_constraintEnd_toEndOf="parent"
346 - app:layout_constraintStart_toStartOf="parent"
347 - app:layout_constraintTop_toBottomOf="@+id/v_separator_sm_count" />
348 - </androidx.constraintlayout.widget.ConstraintLayout>
349 - </androidx.cardview.widget.CardView>
350 -
351 - <LinearLayout
352 - android:layout_width="16dp"
353 - android:layout_height="16dp"
354 - android:layout_alignParentEnd="true"
355 - android:layout_marginTop="4dp"
356 - android:layout_marginEnd="1dp"
357 - android:background="@drawable/shape_cos_counter_orange"
358 - android:gravity="center"
359 - android:orientation="vertical"
360 - android:translationZ="2dp"
361 - app:layout_constraintEnd_toEndOf="parent"
362 - app:layout_constraintTop_toTopOf="parent">
363 -
364 - <TextView
365 - android:id="@+id/tv_sm_count"
366 - android:layout_width="wrap_content"
367 - android:layout_height="16dp"
368 - android:includeFontPadding="false"
369 - android:maxLines="1"
370 - android:textColor="@color/cos_light_black"
371 - android:textSize="12sp"
372 - tools:text="6" />
373 - </LinearLayout>
374 - </RelativeLayout>
375 -
376 - <RelativeLayout
377 - android:id="@+id/rv_gifts_count"
378 - android:layout_width="0dp"
379 - android:layout_height="104dp"
380 - app:layout_constraintBottom_toBottomOf="parent"
381 - app:layout_constraintEnd_toEndOf="parent"
382 - app:layout_constraintStart_toEndOf="@+id/rv_sm_count"
383 - app:layout_constraintTop_toTopOf="parent">
384 -
385 - <androidx.cardview.widget.CardView
386 - android:id="@+id/cv_gifts_count"
387 - android:layout_width="match_parent"
388 - android:layout_height="match_parent"
389 - android:layout_marginHorizontal="2dp"
390 - android:layout_marginVertical="4dp"
391 - app:cardCornerRadius="16dp"
392 - app:cardElevation="2dp">
393 -
394 - <androidx.constraintlayout.widget.ConstraintLayout
395 - android:layout_width="match_parent"
396 - android:layout_height="match_parent"
397 - android:background="@color/cos_skyblue5">
398 -
399 - <ImageView
400 - android:id="@+id/iv_gifts_logo_count"
401 - android:layout_width="34dp"
402 - android:layout_height="34dp"
403 - android:src="@drawable/sv_gifts_redesign"
404 - app:layout_constraintBottom_toTopOf="@+id/v_separator_gifts_count"
405 - app:layout_constraintEnd_toEndOf="parent"
406 - app:layout_constraintStart_toStartOf="parent"
407 - app:layout_constraintTop_toTopOf="parent" />
408 -
409 - <View
410 - android:id="@+id/v_separator_gifts_count"
411 - android:layout_width="match_parent"
412 - android:layout_height="1dp"
413 - android:layout_marginHorizontal="8dp"
414 - android:background="@color/cos_grey2"
415 - app:layout_constraintBottom_toBottomOf="parent"
416 - app:layout_constraintEnd_toEndOf="parent"
417 - app:layout_constraintStart_toStartOf="parent"
418 - app:layout_constraintTop_toTopOf="parent" />
419 -
420 - <TextView
421 - android:id="@+id/tv_gifts_count_title"
422 - android:layout_width="0dp"
423 - android:layout_height="wrap_content"
424 - android:layout_marginHorizontal="8dp"
425 - android:gravity="center"
426 - android:includeFontPadding="false"
427 - android:text="@string/cos_gifts_title"
428 - android:textColor="@color/cos_light_black"
429 - android:textSize="10sp"
430 - app:layout_constraintBottom_toBottomOf="parent"
431 - app:layout_constraintEnd_toEndOf="parent"
432 - app:layout_constraintStart_toStartOf="parent"
433 - app:layout_constraintTop_toBottomOf="@+id/v_separator_gifts_count" />
434 - </androidx.constraintlayout.widget.ConstraintLayout>
435 - </androidx.cardview.widget.CardView>
436 -
437 - <LinearLayout
438 - android:layout_width="16dp"
439 - android:layout_height="16dp"
440 - android:layout_alignParentEnd="true"
441 - android:layout_marginTop="4dp"
442 - android:layout_marginEnd="1dp"
443 - android:background="@drawable/shape_cos_counter_orange"
444 - android:gravity="center"
445 - android:orientation="vertical"
446 - android:translationZ="2dp"
447 - app:layout_constraintEnd_toEndOf="parent"
448 - app:layout_constraintTop_toTopOf="parent">
449 -
450 - <TextView
451 - android:id="@+id/tv_gifts_count"
452 - android:layout_width="wrap_content"
453 - android:layout_height="16dp"
454 - android:includeFontPadding="false"
455 - android:maxLines="1"
456 - android:textColor="@color/cos_light_black"
457 - android:textSize="12sp"
458 - tools:text="6" />
459 - </LinearLayout>
460 - </RelativeLayout>
461 - </androidx.constraintlayout.widget.ConstraintLayout>
462 - </LinearLayout>
463 -
464 - <LinearLayout
465 - android:id="@+id/ll_vouchers_spinner"
466 - android:layout_width="match_parent"
467 - android:layout_height="wrap_content"
468 - android:layout_marginHorizontal="14dp"
469 - android:layout_marginTop="32dp"
470 - android:gravity="center_horizontal"
471 - android:orientation="vertical"
472 - android:visibility="gone"
473 - tools:visibility="visible">
474 -
475 - <ProgressBar
476 - android:id="@+id/pb_vouchers"
477 - android:layout_width="48dp"
478 - android:layout_height="48dp"
479 - android:theme="@style/progressBarGreen" />
480 - </LinearLayout>
481 -
482 - <LinearLayout
483 - android:id="@+id/ll_vouchers"
484 - android:layout_width="match_parent"
485 - android:layout_height="wrap_content"
486 - android:layout_marginHorizontal="14dp"
487 - android:layout_marginTop="32dp"
488 - android:orientation="vertical"
489 - android:visibility="gone"
490 - tools:visibility="gone">
491 -
492 - <View
493 - android:id="@+id/v_separator_vouchers"
494 - android:layout_width="match_parent"
495 - android:layout_height="1dp"
496 - android:background="@color/cos_gray" />
497 -
498 - <TextView
499 - android:id="@+id/tv_vouchers_title"
500 - android:layout_width="wrap_content"
501 - android:layout_height="wrap_content"
502 - android:layout_marginTop="24dp"
503 - android:includeFontPadding="false"
504 - android:maxLines="1"
505 - android:text="@string/cos_vouchers_title"
506 - android:textColor="@color/cos_light_black"
507 - android:textSize="22sp" />
508 -
509 - <androidx.cardview.widget.CardView
510 - android:id="@+id/cv_vouchers"
511 - android:layout_width="match_parent"
512 - android:layout_height="70dp"
513 - android:layout_marginHorizontal="2dp"
514 - android:layout_marginTop="24dp"
515 - android:layout_marginBottom="4dp"
516 - app:cardCornerRadius="16dp"
517 - app:cardElevation="2dp">
518 -
519 - <androidx.constraintlayout.widget.ConstraintLayout
520 - android:layout_width="match_parent"
521 - android:layout_height="match_parent"
522 - android:background="@color/white">
523 -
524 - <ImageView
525 - android:id="@+id/iv_vouchers_logo"
526 - android:layout_width="32dp"
527 - android:layout_height="30dp"
528 - android:layout_marginStart="16dp"
529 - android:src="@drawable/sv_vouchers"
530 - app:layout_constraintBottom_toBottomOf="parent"
531 - app:layout_constraintStart_toStartOf="parent"
532 - app:layout_constraintTop_toTopOf="parent" />
533 -
534 - <TextView
535 - android:id="@+id/tv_vouchers_info_title"
536 - android:layout_width="0dp"
537 - android:layout_height="wrap_content"
538 - android:layout_marginHorizontal="8dp"
539 - android:includeFontPadding="false"
540 - android:lineHeight="24dp"
541 - android:text="@string/cos_vouchers_info_title"
542 - android:textColor="@color/cos_light_black"
543 - android:textSize="14sp"
544 - app:layout_constraintBottom_toBottomOf="@+id/iv_vouchers_logo"
545 - app:layout_constraintEnd_toStartOf="@+id/iv_vouchers_arrow"
546 - app:layout_constraintHorizontal_bias="0.0"
547 - app:layout_constraintStart_toEndOf="@+id/iv_vouchers_logo"
548 - app:layout_constraintTop_toTopOf="@+id/iv_vouchers_logo" />
549 -
550 - <ImageView
551 - android:id="@+id/iv_vouchers_arrow"
552 - android:layout_width="16dp"
553 - android:layout_height="10dp"
554 - android:layout_marginEnd="16dp"
555 - android:rotation="270"
556 - android:src="@drawable/sv_arrow_down"
557 - app:layout_constraintBottom_toBottomOf="parent"
558 - app:layout_constraintEnd_toEndOf="parent"
559 - app:layout_constraintTop_toTopOf="parent" />
560 - </androidx.constraintlayout.widget.ConstraintLayout>
561 - </androidx.cardview.widget.CardView>
562 - </LinearLayout>
563 -
564 - <LinearLayout
565 - android:id="@+id/ll_vouchers_disabled"
566 - android:layout_width="match_parent"
567 - android:layout_height="wrap_content"
568 - android:layout_marginHorizontal="14dp"
569 - android:layout_marginTop="32dp"
570 - android:orientation="vertical"
571 - android:visibility="gone"
572 - tools:visibility="gone">
573 -
574 - <View
575 - android:id="@+id/v_separator_vouchers_disabled"
576 - android:layout_width="match_parent"
577 - android:layout_height="1dp"
578 - android:background="@color/cos_gray" />
579 -
580 - <TextView
581 - android:id="@+id/tv_vouchers_title_disabled"
582 - android:layout_width="wrap_content"
583 - android:layout_height="wrap_content"
584 - android:layout_marginTop="24dp"
585 - android:includeFontPadding="false"
586 - android:maxLines="1"
587 - android:text="@string/cos_vouchers_title"
588 - android:textColor="@color/cos_light_black"
589 - android:textSize="22sp" />
590 -
591 - <androidx.cardview.widget.CardView
592 - android:id="@+id/cv_vouchers_disabled"
593 - android:layout_width="match_parent"
594 - android:layout_height="70dp"
595 - android:layout_marginHorizontal="2dp"
596 - android:layout_marginTop="24dp"
597 - android:layout_marginBottom="4dp"
598 - app:cardCornerRadius="16dp"
599 - app:cardElevation="2dp">
600 -
601 - <androidx.constraintlayout.widget.ConstraintLayout
602 - android:layout_width="match_parent"
603 - android:layout_height="match_parent"
604 - android:background="@color/white">
605 -
606 - <ImageView
607 - android:id="@+id/iv_vouchers_logo_disabled"
608 - android:layout_width="32dp"
609 - android:layout_height="30dp"
610 - android:layout_marginStart="16dp"
611 - android:src="@drawable/sv_vouchers_disabled"
612 - app:layout_constraintBottom_toBottomOf="parent"
613 - app:layout_constraintStart_toStartOf="parent"
614 - app:layout_constraintTop_toTopOf="parent" />
615 -
616 - <TextView
617 - android:id="@+id/tv_vouchers_info_title_disabled"
618 - android:layout_width="wrap_content"
619 - android:layout_height="wrap_content"
620 - android:layout_marginHorizontal="8dp"
621 - android:includeFontPadding="false"
622 - android:lineHeight="24dp"
623 - android:text="@string/cos_vouchers_info_title_disabled"
624 - android:textColor="@color/cos_gray2"
625 - android:textSize="14sp"
626 - app:layout_constraintBottom_toBottomOf="@+id/iv_vouchers_logo_disabled"
627 - app:layout_constraintEnd_toStartOf="@+id/iv_vouchers_arrow_disabled"
628 - app:layout_constraintHorizontal_bias="0.0"
629 - app:layout_constraintStart_toEndOf="@+id/iv_vouchers_logo_disabled"
630 - app:layout_constraintTop_toTopOf="@+id/iv_vouchers_logo_disabled" />
631 -
632 - <ImageView
633 - android:id="@+id/iv_vouchers_arrow_disabled"
634 - android:layout_width="16dp"
635 - android:layout_height="10dp"
636 - android:layout_marginEnd="16dp"
637 - android:rotation="270"
638 - android:src="@drawable/sv_arrow_down"
639 - app:layout_constraintBottom_toBottomOf="parent"
640 - app:layout_constraintEnd_toEndOf="parent"
641 - app:layout_constraintTop_toTopOf="parent" />
642 -
643 - <LinearLayout
644 - android:layout_width="16dp"
645 - android:layout_height="16dp"
646 - android:layout_marginStart="2dp"
647 - android:background="@drawable/shape_cos_counter_orange"
648 - android:gravity="center"
649 - android:orientation="vertical"
650 - app:layout_constraintBottom_toTopOf="@+id/tv_vouchers_info_title_disabled"
651 - app:layout_constraintStart_toEndOf="@+id/tv_vouchers_info_title_disabled"
652 - app:layout_constraintTop_toTopOf="@+id/tv_vouchers_info_title_disabled">
653 -
654 - <TextView
655 - android:id="@+id/tv_vouchers_count_disabled"
656 - android:layout_width="wrap_content"
657 - android:layout_height="16dp"
658 - android:includeFontPadding="false"
659 - android:maxLines="1"
660 - android:text="0"
661 - android:textColor="@color/cos_light_black"
662 - android:textSize="12sp" />
663 - </LinearLayout>
664 - </androidx.constraintlayout.widget.ConstraintLayout>
665 - </androidx.cardview.widget.CardView>
666 - </LinearLayout>
667 -
668 - <LinearLayout
669 - android:id="@+id/ll_empty_wallet"
670 - android:layout_width="match_parent"
671 - android:layout_height="wrap_content"
672 - android:layout_marginHorizontal="32dp"
673 - android:layout_marginTop="32dp"
674 - android:gravity="center"
675 - android:orientation="vertical"
676 - android:visibility="gone"
677 - tools:visibility="gone">
678 -
679 - <ImageView
680 - android:layout_width="72dp"
681 - android:layout_height="72dp"
682 - android:src="@drawable/ic_empty_wallet" />
683 -
684 - <TextView
685 - android:layout_width="wrap_content"
686 - android:layout_height="wrap_content"
687 - android:layout_marginTop="8dp"
688 - android:gravity="center"
689 - android:text="@string/cos_empty_wallet"
690 - android:textColor="@color/cos_light_black"
691 - android:textSize="16sp" />
692 - </LinearLayout>
693 -
694 - <androidx.cardview.widget.CardView
695 - android:id="@+id/cl_exp"
696 - android:layout_width="match_parent"
697 - android:layout_height="wrap_content"
698 - android:layout_marginHorizontal="11dp"
699 - android:layout_marginTop="24dp"
700 - android:visibility="gone"
701 - app:cardCornerRadius="16dp"
702 - app:cardElevation="2dp"
703 - tools:visibility="gone">
704 -
705 - <androidx.constraintlayout.widget.ConstraintLayout
706 - android:layout_width="match_parent"
707 - android:layout_height="wrap_content"
708 - android:background="@color/white"
709 - android:paddingHorizontal="14dp"
710 - android:paddingVertical="14dp">
711 -
712 - <androidx.constraintlayout.widget.Guideline
713 - android:id="@+id/gl_horizontal_64_exp"
714 - android:layout_width="wrap_content"
715 - android:layout_height="match_parent"
716 - android:orientation="horizontal"
717 - app:layout_constraintGuide_percent="0.64" />
718 -
719 - <ImageView
720 - android:id="@+id/iv_exp_logo"
721 - android:layout_width="76dp"
722 - android:layout_height="76dp"
723 - android:layout_marginVertical="4dp"
724 - android:src="@drawable/ic_foryou_polygon_new"
725 - app:layout_constraintBottom_toBottomOf="parent"
726 - app:layout_constraintStart_toStartOf="parent"
727 - app:layout_constraintTop_toTopOf="parent" />
728 -
729 - <TextView
730 - android:id="@+id/tv_exp_value"
731 - android:layout_width="wrap_content"
732 - android:layout_height="wrap_content"
733 - android:includeFontPadding="false"
734 - android:textColor="@color/cos_light_black"
735 - android:textSize="14sp"
736 - app:layout_constraintEnd_toEndOf="@+id/iv_exp_logo"
737 - app:layout_constraintStart_toStartOf="@+id/iv_exp_logo"
738 - app:layout_constraintTop_toBottomOf="@+id/gl_horizontal_64_exp"
739 - tools:text="18.00€" />
740 -
741 - <TextView
742 - android:id="@+id/tv_exp_value_all"
743 - android:layout_width="0dp"
744 - android:layout_height="wrap_content"
745 - android:layout_marginHorizontal="8dp"
746 - android:includeFontPadding="false"
747 - android:text="@string/cos_for_you_all"
748 - android:textColor="@color/cos_light_black"
749 - android:textSize="15sp"
750 - app:layout_constraintBottom_toBottomOf="parent"
751 - app:layout_constraintEnd_toStartOf="@+id/iv_exp_arrow"
752 - app:layout_constraintStart_toEndOf="@+id/iv_exp_logo"
753 - app:layout_constraintTop_toTopOf="parent" />
754 -
755 - <ImageView
756 - android:id="@+id/iv_exp_arrow"
757 - android:layout_width="14dp"
758 - android:layout_height="14dp"
759 - android:src="@drawable/ic_down_dark_new"
760 - android:visibility="gone"
761 - app:layout_constraintBottom_toBottomOf="parent"
762 - app:layout_constraintEnd_toEndOf="parent"
763 - app:layout_constraintTop_toTopOf="parent" />
764 - </androidx.constraintlayout.widget.ConstraintLayout>
765 - </androidx.cardview.widget.CardView>
766 -
767 - <net.cachapa.expandablelayout.ExpandableLayout
768 - android:id="@+id/el_exp"
769 - android:layout_width="match_parent"
770 - android:layout_height="wrap_content"
771 - app:el_duration="300"
772 - app:el_expanded="false"
773 - app:el_parallax="0.5">
774 -
775 - <RelativeLayout
776 - android:layout_width="match_parent"
777 - android:layout_height="wrap_content">
778 -
779 - <androidx.cardview.widget.CardView
780 - android:id="@+id/cv_deals_win_inner_cos"
781 - android:layout_width="match_parent"
782 - android:layout_height="wrap_content"
783 - android:layout_marginHorizontal="16dp"
784 - android:layout_marginTop="6dp"
785 - app:cardCornerRadius="16dp"
786 - app:cardElevation="2dp">
787 -
788 - <androidx.constraintlayout.widget.ConstraintLayout
789 - android:id="@+id/cl_deals_win_inner_cos"
790 - android:layout_width="match_parent"
791 - android:layout_height="wrap_content"
792 - android:background="@color/white"
793 - android:paddingHorizontal="6dp"
794 - android:paddingVertical="4dp">
795 -
796 - <androidx.constraintlayout.widget.Guideline
797 - android:id="@+id/gl_horizontal_50_cos"
798 - android:layout_width="wrap_content"
799 - android:layout_height="match_parent"
800 - android:orientation="horizontal"
801 - app:layout_constraintGuide_percent="0.64" />
802 -
803 - <ImageView
804 - android:id="@+id/iv_deals_logo"
805 - android:layout_width="76dp"
806 - android:layout_height="76dp"
807 - android:src="@drawable/ic_deals_polygon_new"
808 - app:layout_constraintBottom_toBottomOf="parent"
809 - app:layout_constraintStart_toStartOf="parent"
810 - app:layout_constraintTop_toTopOf="parent" />
811 -
812 - <TextView
813 - android:id="@+id/tv_deals_value_all"
814 - android:layout_width="0dp"
815 - android:layout_height="wrap_content"
816 - android:layout_marginHorizontal="8dp"
817 - android:includeFontPadding="false"
818 - android:text="@string/cos_deals_win_title_cos"
819 - android:textColor="@color/cos_light_black"
820 - android:textSize="15sp"
821 - app:layout_constraintBottom_toBottomOf="parent"
822 - app:layout_constraintEnd_toEndOf="parent"
823 - app:layout_constraintStart_toEndOf="@+id/iv_deals_logo"
824 - app:layout_constraintTop_toTopOf="parent" />
825 -
826 - <TextView
827 - android:id="@+id/tv_deals_value"
828 - android:layout_width="wrap_content"
829 - android:layout_height="wrap_content"
830 - android:includeFontPadding="false"
831 - android:textColor="@color/cos_light_black"
832 - android:textSize="14sp"
833 - app:layout_constraintEnd_toEndOf="@+id/iv_deals_logo"
834 - app:layout_constraintStart_toStartOf="@+id/iv_deals_logo"
835 - app:layout_constraintTop_toBottomOf="@+id/gl_horizontal_50_cos"
836 - tools:text="18.00€" />
837 - </androidx.constraintlayout.widget.ConstraintLayout>
838 - </androidx.cardview.widget.CardView>
839 -
840 - <androidx.cardview.widget.CardView
841 - android:id="@+id/cv_deals_win_inner"
842 - android:layout_width="match_parent"
843 - android:layout_height="wrap_content"
844 - android:layout_below="@+id/cv_deals_win_inner_cos"
845 - android:layout_marginHorizontal="16dp"
846 - android:layout_marginTop="6dp"
847 - app:cardCornerRadius="16dp"
848 - app:cardElevation="2dp">
849 -
850 - <androidx.constraintlayout.widget.ConstraintLayout
851 - android:id="@+id/cl_deals_win_inner"
852 - android:layout_width="match_parent"
853 - android:layout_height="wrap_content"
854 - android:background="@color/white"
855 - android:paddingHorizontal="6dp"
856 - android:paddingVertical="4dp">
857 -
858 - <androidx.constraintlayout.widget.Guideline
859 - android:id="@+id/gl_horizontal_50"
860 - android:layout_width="wrap_content"
861 - android:layout_height="match_parent"
862 - android:orientation="horizontal"
863 - app:layout_constraintGuide_percent="0.64" />
864 -
865 - <ImageView
866 - android:id="@+id/iv_gifts_logo"
867 - android:layout_width="76dp"
868 - android:layout_height="76dp"
869 - android:src="@drawable/ic_gifts_polygon_new"
870 - app:layout_constraintBottom_toBottomOf="parent"
871 - app:layout_constraintStart_toStartOf="parent"
872 - app:layout_constraintTop_toTopOf="parent" />
873 -
874 - <TextView
875 - android:id="@+id/tv_gifts_value_all"
876 - android:layout_width="0dp"
877 - android:layout_height="wrap_content"
878 - android:layout_marginHorizontal="8dp"
879 - android:includeFontPadding="false"
880 - android:text="@string/cos_deals_win_title"
881 - android:textColor="@color/cos_light_black"
882 - android:textSize="15sp"
883 - app:layout_constraintBottom_toBottomOf="parent"
884 - app:layout_constraintEnd_toEndOf="parent"
885 - app:layout_constraintStart_toEndOf="@+id/iv_gifts_logo"
886 - app:layout_constraintTop_toTopOf="parent" />
887 -
888 - <TextView
889 - android:id="@+id/tv_gifts_value"
890 - android:layout_width="wrap_content"
891 - android:layout_height="wrap_content"
892 - android:includeFontPadding="false"
893 - android:textColor="@color/cos_light_black"
894 - android:textSize="14sp"
895 - app:layout_constraintEnd_toEndOf="@+id/iv_gifts_logo"
896 - app:layout_constraintStart_toStartOf="@+id/iv_gifts_logo"
897 - app:layout_constraintTop_toBottomOf="@+id/gl_horizontal_50"
898 - tools:text="20.00€" />
899 - </androidx.constraintlayout.widget.ConstraintLayout>
900 - </androidx.cardview.widget.CardView>
901 -
902 - <androidx.cardview.widget.CardView
903 - android:id="@+id/cv_market_inner"
904 - android:layout_width="match_parent"
905 - android:layout_height="wrap_content"
906 - android:layout_below="@+id/cv_deals_win_inner"
907 - android:layout_marginHorizontal="16dp"
908 - android:layout_marginTop="6dp"
909 - android:layout_marginBottom="6dp"
910 - app:cardCornerRadius="16dp"
911 - app:cardElevation="2dp">
912 -
913 - <androidx.constraintlayout.widget.ConstraintLayout
914 - android:id="@+id/cl_market_inner"
915 - android:layout_width="match_parent"
916 - android:layout_height="wrap_content"
917 - android:background="@color/white"
918 - android:paddingHorizontal="6dp"
919 - android:paddingVertical="4dp">
920 -
921 - <androidx.constraintlayout.widget.Guideline
922 - android:id="@+id/gl_horizontal_50_market"
923 - android:layout_width="wrap_content"
924 - android:layout_height="match_parent"
925 - android:orientation="horizontal"
926 - app:layout_constraintGuide_percent="0.64" />
927 -
928 - <ImageView
929 - android:id="@+id/iv_market_logo"
930 - android:layout_width="76dp"
931 - android:layout_height="76dp"
932 - android:src="@drawable/ic_market_polygon"
933 - app:layout_constraintBottom_toBottomOf="parent"
934 - app:layout_constraintStart_toStartOf="parent"
935 - app:layout_constraintTop_toTopOf="parent" />
936 -
937 - <TextView
938 - android:id="@+id/tv_market_value_all"
939 - android:layout_width="0dp"
940 - android:layout_height="wrap_content"
941 - android:layout_marginHorizontal="8dp"
942 - android:includeFontPadding="false"
943 - android:text="@string/cos_supermarket_win"
944 - android:textColor="@color/cos_light_black"
945 - android:textSize="15sp"
946 - app:layout_constraintBottom_toBottomOf="parent"
947 - app:layout_constraintEnd_toEndOf="parent"
948 - app:layout_constraintStart_toEndOf="@+id/iv_market_logo"
949 - app:layout_constraintTop_toTopOf="parent" />
950 -
951 - <TextView
952 - android:id="@+id/tv_market_value"
953 - android:layout_width="wrap_content"
954 - android:layout_height="wrap_content"
955 - android:includeFontPadding="false"
956 - android:textColor="@color/cos_light_black"
957 - android:textSize="14sp"
958 - app:layout_constraintEnd_toEndOf="@+id/iv_market_logo"
959 - app:layout_constraintStart_toStartOf="@+id/iv_market_logo"
960 - app:layout_constraintTop_toBottomOf="@+id/gl_horizontal_50_market"
961 - tools:text="20.00€" />
962 - </androidx.constraintlayout.widget.ConstraintLayout>
963 - </androidx.cardview.widget.CardView>
964 - </RelativeLayout>
965 - </net.cachapa.expandablelayout.ExpandableLayout>
966 -
967 - <LinearLayout
968 - android:id="@+id/ll_market_view"
969 - android:layout_width="match_parent"
970 - android:layout_height="wrap_content"
971 - android:layout_marginTop="20dp"
972 - android:orientation="vertical"
973 - android:visibility="gone"
974 - tools:visibility="gone">
975 -
976 - <TextView
977 - android:id="@+id/tv_market_header"
978 - android:layout_width="wrap_content"
979 - android:layout_height="wrap_content"
980 - android:layout_gravity="start"
981 - android:layout_marginHorizontal="16dp"
982 - android:layout_marginBottom="10dp"
983 - android:text="@string/cos_market_title"
984 - android:textColor="@color/cos_light_blue"
985 - android:textSize="19sp" />
986 -
987 - <androidx.recyclerview.widget.RecyclerView
988 - android:id="@+id/rv_market_coupons"
989 - android:layout_width="match_parent"
990 - android:layout_height="wrap_content"
991 - android:layout_marginHorizontal="2dp"
992 - android:overScrollMode="never"
993 - android:scrollbars="none" />
994 - </LinearLayout>
995 -
996 - <LinearLayout
997 - android:id="@+id/ll_mygifts"
998 - android:layout_width="match_parent"
999 - android:layout_height="wrap_content"
1000 - android:layout_marginTop="24dp"
1001 - android:orientation="vertical"
1002 - android:visibility="gone"
1003 - tools:visibility="gone">
1004 -
1005 - <ImageView
1006 - android:id="@+id/dfy_logo"
1007 - android:layout_width="200dp"
1008 - android:layout_height="30dp"
1009 - android:layout_gravity="start"
1010 - android:layout_marginHorizontal="16dp"
1011 - android:src="@drawable/ic_deals_horizontal" />
1012 -
1013 - <androidx.cardview.widget.CardView
1014 - android:layout_width="match_parent"
1015 - android:layout_height="wrap_content"
1016 - android:layout_marginHorizontal="11dp"
1017 - android:layout_marginTop="8dp"
1018 - android:layout_marginBottom="6dp"
1019 - android:paddingVertical="10dp"
1020 - app:cardCornerRadius="16dp"
1021 - app:cardElevation="2dp">
1022 -
1023 - <androidx.constraintlayout.widget.ConstraintLayout
1024 - android:id="@+id/cl_mygifts"
1025 - android:layout_width="match_parent"
1026 - android:layout_height="wrap_content"
1027 - android:background="@color/white"
1028 - android:paddingVertical="8dp">
1029 -
1030 - <LinearLayout
1031 - android:layout_width="0dp"
1032 - android:layout_height="wrap_content"
1033 - android:layout_marginStart="20dp"
1034 - android:layout_marginEnd="24dp"
1035 - android:orientation="vertical"
1036 - app:layout_constraintBottom_toBottomOf="parent"
1037 - app:layout_constraintEnd_toStartOf="@+id/iv_deals_circle"
1038 - app:layout_constraintStart_toStartOf="parent"
1039 - app:layout_constraintTop_toTopOf="parent">
1040 -
1041 - <TextView
1042 - android:id="@+id/tv_active_gifts"
1043 - android:layout_width="wrap_content"
1044 - android:layout_height="wrap_content"
1045 - android:textColor="@color/cos_light_black"
1046 - android:textSize="18sp"
1047 - tools:text="@string/cos_active_deals" />
1048 -
1049 - <TextView
1050 - android:id="@+id/tv_active_deals_text"
1051 - android:layout_width="wrap_content"
1052 - android:layout_height="wrap_content"
1053 - android:ellipsize="end"
1054 - android:maxLines="2"
1055 - android:textColor="@color/cos_light_black"
1056 - android:textIsSelectable="true"
1057 - android:textSize="18sp"
1058 - tools:text="961544809"
1059 - tools:visibility="gone" />
1060 -
1061 - <ScrollView
1062 - android:id="@+id/sv_active_deals_codes_view"
1063 - android:layout_width="match_parent"
1064 - android:layout_height="48dp"
1065 - android:nestedScrollingEnabled="true"
1066 - android:visibility="gone">
1067 -
1068 - <org.apmem.tools.layouts.FlowLayout
1069 - android:id="@+id/ll_active_deals_codes_view"
1070 - android:layout_width="match_parent"
1071 - android:layout_height="wrap_content"
1072 - android:visibility="gone">
1073 -
1074 - </org.apmem.tools.layouts.FlowLayout>
1075 - </ScrollView>
1076 -
1077 - <TextView
1078 - android:id="@+id/tv_active_deals_date_text"
1079 - android:layout_width="wrap_content"
1080 - android:layout_height="wrap_content"
1081 - android:textColor="@color/cos_light_black"
1082 - android:visibility="gone"
1083 - tools:text="@string/cos_active_coupon_date" />
1084 - </LinearLayout>
1085 -
1086 - <ImageView
1087 - android:id="@+id/iv_deals_circle"
1088 - android:layout_width="86dp"
1089 - android:layout_height="86dp"
1090 - android:layout_marginVertical="4dp"
1091 - android:layout_marginEnd="20dp"
1092 - android:src="@drawable/ic_deals_new"
1093 - app:layout_constraintBottom_toBottomOf="parent"
1094 - app:layout_constraintEnd_toEndOf="parent"
1095 - app:layout_constraintTop_toTopOf="parent" />
1096 - </androidx.constraintlayout.widget.ConstraintLayout>
1097 - </androidx.cardview.widget.CardView>
1098 - </LinearLayout>
1099 -
1100 - <LinearLayout
1101 - android:id="@+id/ll_gifts_view"
1102 - android:layout_width="match_parent"
1103 - android:layout_height="wrap_content"
1104 - android:layout_marginTop="24dp"
1105 - android:orientation="vertical"
1106 - android:visibility="gone"
1107 - tools:visibility="gone">
1108 -
1109 - <TextView
1110 - android:id="@+id/tv_active_coupons_header"
1111 - android:layout_width="wrap_content"
1112 - android:layout_height="wrap_content"
1113 - android:layout_gravity="start"
1114 - android:layout_marginHorizontal="16dp"
1115 - android:layout_marginBottom="10dp"
1116 - android:text="@string/cos_gifts_title"
1117 - android:textColor="@color/cos_light_blue"
1118 - android:textSize="19sp" />
1119 -
1120 - <androidx.recyclerview.widget.RecyclerView
1121 - android:id="@+id/rv_active_coupons"
1122 - android:layout_width="match_parent"
1123 - android:layout_height="wrap_content"
1124 - android:layout_marginHorizontal="2dp"
1125 - android:overScrollMode="never"
1126 - android:paddingBottom="40dp"
1127 - android:scrollbars="none" />
1128 - </LinearLayout>
1129 - </LinearLayout>
1130 - </RelativeLayout>
1131 - </LinearLayout>
1132 - </androidx.core.widget.NestedScrollView>
1133 -</RelativeLayout>
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
5 <attr name="dashLength" format="dimension" /> 5 <attr name="dashLength" format="dimension" />
6 <attr name="dashGap" format="dimension" /> 6 <attr name="dashGap" format="dimension" />
7 <attr name="dashThickness" format="dimension" /> 7 <attr name="dashThickness" format="dimension" />
8 + <attr name="colorPrimary" format="color" />
8 <attr name="orientation" format="enum"> 9 <attr name="orientation" format="enum">
9 <enum name="horizontal" value="0" /> 10 <enum name="horizontal" value="0" />
10 <enum name="vertical" value="1" /> 11 <enum name="vertical" value="1" />
......