Showing
11 changed files
with
78 additions
and
57 deletions
... | @@ -2,7 +2,7 @@ apply plugin: 'com.android.library' | ... | @@ -2,7 +2,7 @@ apply plugin: 'com.android.library' |
2 | 2 | ||
3 | ext { | 3 | ext { |
4 | PUBLISH_GROUP_ID = 'ly.warp' | 4 | PUBLISH_GROUP_ID = 'ly.warp' |
5 | - PUBLISH_VERSION = '4.5.4.6rc4' | 5 | + PUBLISH_VERSION = '4.5.4.6rc5' |
6 | PUBLISH_ARTIFACT_ID = 'warply-android-sdk' | 6 | PUBLISH_ARTIFACT_ID = 'warply-android-sdk' |
7 | } | 7 | } |
8 | 8 | ||
... | @@ -45,7 +45,8 @@ dependencies { | ... | @@ -45,7 +45,8 @@ dependencies { |
45 | implementation 'androidx.appcompat:appcompat:1.4.1' | 45 | implementation 'androidx.appcompat:appcompat:1.4.1' |
46 | implementation 'androidx.recyclerview:recyclerview:1.2.1' | 46 | implementation 'androidx.recyclerview:recyclerview:1.2.1' |
47 | implementation 'androidx.cardview:cardview:1.0.0' | 47 | implementation 'androidx.cardview:cardview:1.0.0' |
48 | - api "androidx.security:security-crypto:1.1.0-alpha03" // For minSDK 23 use 1.0.0, for minSDK 21 use 1.1.0 that is currently in alpha | 48 | + api "androidx.security:security-crypto:1.1.0-alpha03" |
49 | + // For minSDK 23 use 1.0.0, for minSDK 21 use 1.1.0 that is currently in alpha | ||
49 | api 'org.altbeacon:android-beacon-library:2.19.3' | 50 | api 'org.altbeacon:android-beacon-library:2.19.3' |
50 | api 'org.jbundle.util.osgi.wrapped:org.jbundle.util.osgi.wrapped.org.apache.http.client:4.1.2' | 51 | api 'org.jbundle.util.osgi.wrapped:org.jbundle.util.osgi.wrapped.org.apache.http.client:4.1.2' |
51 | implementation 'de.hdodenhof:circleimageview:3.1.0' | 52 | implementation 'de.hdodenhof:circleimageview:3.1.0' |
... | @@ -59,12 +60,14 @@ dependencies { | ... | @@ -59,12 +60,14 @@ dependencies { |
59 | 60 | ||
60 | //------------------------------ Firebase -----------------------------// | 61 | //------------------------------ Firebase -----------------------------// |
61 | api platform('com.google.firebase:firebase-bom:29.0.3') | 62 | api platform('com.google.firebase:firebase-bom:29.0.3') |
62 | - implementation 'com.google.firebase:firebase-messaging' | 63 | + implementation('com.google.firebase:firebase-messaging') { |
64 | + exclude group: 'com.google.android.gms', module: 'play-services-location' | ||
65 | + } | ||
63 | 66 | ||
64 | //------------------------------ GMS -----------------------------// | 67 | //------------------------------ GMS -----------------------------// |
65 | api 'com.google.android.gms:play-services-base:18.1.0' | 68 | api 'com.google.android.gms:play-services-base:18.1.0' |
66 | - implementation 'com.google.android.gms:play-services-location:21.0.0' | 69 | + implementation 'com.google.android.gms:play-services-location:19.0.1' |
67 | - implementation 'com.google.android.gms:play-services-maps:18.1.0' | 70 | + implementation 'com.google.android.gms:play-services-maps:18.0.2' |
68 | api 'com.google.maps.android:android-maps-utils:0.5' | 71 | api 'com.google.maps.android:android-maps-utils:0.5' |
69 | 72 | ||
70 | //------------------------------ Work Manager -----------------------------// | 73 | //------------------------------ Work Manager -----------------------------// | ... | ... |
... | @@ -225,6 +225,7 @@ public class ContextualActivity extends Activity implements View.OnClickListener | ... | @@ -225,6 +225,7 @@ public class ContextualActivity extends Activity implements View.OnClickListener |
225 | } | 225 | } |
226 | 226 | ||
227 | private void askActivateDialog() { | 227 | private void askActivateDialog() { |
228 | + if (!isFinishing()) { | ||
228 | mAlertDialogAskActivate = new AlertDialog.Builder(this) | 229 | mAlertDialogAskActivate = new AlertDialog.Builder(this) |
229 | .setTitle(R.string.cos_dlg_activate_telco_title) | 230 | .setTitle(R.string.cos_dlg_activate_telco_title) |
230 | .setMessage(R.string.cos_dlg_activate_telco_subtitle) | 231 | .setMessage(R.string.cos_dlg_activate_telco_subtitle) |
... | @@ -236,6 +237,7 @@ public class ContextualActivity extends Activity implements View.OnClickListener | ... | @@ -236,6 +237,7 @@ public class ContextualActivity extends Activity implements View.OnClickListener |
236 | }) | 237 | }) |
237 | .show(); | 238 | .show(); |
238 | } | 239 | } |
240 | + } | ||
239 | 241 | ||
240 | private void errorActivatingDialog() { | 242 | private void errorActivatingDialog() { |
241 | LoyaltySDKFirebaseEventModel analyticsEvent = new LoyaltySDKFirebaseEventModel(); | 243 | LoyaltySDKFirebaseEventModel analyticsEvent = new LoyaltySDKFirebaseEventModel(); |
... | @@ -264,6 +266,7 @@ public class ContextualActivity extends Activity implements View.OnClickListener | ... | @@ -264,6 +266,7 @@ public class ContextualActivity extends Activity implements View.OnClickListener |
264 | analyticsEvent.setParameter("successful", "true"); | 266 | analyticsEvent.setParameter("successful", "true"); |
265 | EventBus.getDefault().post(new WarplyEventBusManager(analyticsEvent)); | 267 | EventBus.getDefault().post(new WarplyEventBusManager(analyticsEvent)); |
266 | 268 | ||
269 | + if (!isFinishing()) { | ||
267 | mAlertDialogSuccessActivating = new AlertDialog.Builder(this) | 270 | mAlertDialogSuccessActivating = new AlertDialog.Builder(this) |
268 | .setTitle(R.string.cos_dlg_activate_success_title) | 271 | .setTitle(R.string.cos_dlg_activate_success_title) |
269 | .setMessage(R.string.cos_dlg_activate_success_subtitle) | 272 | .setMessage(R.string.cos_dlg_activate_success_subtitle) |
... | @@ -272,6 +275,7 @@ public class ContextualActivity extends Activity implements View.OnClickListener | ... | @@ -272,6 +275,7 @@ public class ContextualActivity extends Activity implements View.OnClickListener |
272 | }) | 275 | }) |
273 | .show(); | 276 | .show(); |
274 | } | 277 | } |
278 | + } | ||
275 | 279 | ||
276 | // =========================================================== | 280 | // =========================================================== |
277 | // Inner and Anonymous Classes | 281 | // Inner and Anonymous Classes | ... | ... |
... | @@ -216,6 +216,7 @@ public class CouponShareActivity extends Activity implements View.OnClickListene | ... | @@ -216,6 +216,7 @@ public class CouponShareActivity extends Activity implements View.OnClickListene |
216 | } | 216 | } |
217 | 217 | ||
218 | private void acceptSharingDialog() { | 218 | private void acceptSharingDialog() { |
219 | + if (!isFinishing()) { | ||
219 | mAlertDialogSuccessSharing = new AlertDialog.Builder(this) | 220 | mAlertDialogSuccessSharing = new AlertDialog.Builder(this) |
220 | .setTitle(R.string.cos_dlg_success_title) | 221 | .setTitle(R.string.cos_dlg_success_title) |
221 | .setMessage(R.string.cos_dlg_positive_coupon_text) | 222 | .setMessage(R.string.cos_dlg_positive_coupon_text) |
... | @@ -228,8 +229,10 @@ public class CouponShareActivity extends Activity implements View.OnClickListene | ... | @@ -228,8 +229,10 @@ public class CouponShareActivity extends Activity implements View.OnClickListene |
228 | }) | 229 | }) |
229 | .show(); | 230 | .show(); |
230 | } | 231 | } |
232 | + } | ||
231 | 233 | ||
232 | private void errorSharingDialog() { | 234 | private void errorSharingDialog() { |
235 | + if (!isFinishing()) { | ||
233 | mAlertDialogErrorSharing = new AlertDialog.Builder(this) | 236 | mAlertDialogErrorSharing = new AlertDialog.Builder(this) |
234 | .setTitle(R.string.cos_dlg_error_title) | 237 | .setTitle(R.string.cos_dlg_error_title) |
235 | .setMessage(R.string.cos_dlg_error_subtitle) | 238 | .setMessage(R.string.cos_dlg_error_subtitle) |
... | @@ -238,8 +241,10 @@ public class CouponShareActivity extends Activity implements View.OnClickListene | ... | @@ -238,8 +241,10 @@ public class CouponShareActivity extends Activity implements View.OnClickListene |
238 | }) | 241 | }) |
239 | .show(); | 242 | .show(); |
240 | } | 243 | } |
244 | + } | ||
241 | 245 | ||
242 | private void wrongNumberDialog(String message) { | 246 | private void wrongNumberDialog(String message) { |
247 | + if (!isFinishing()) { | ||
243 | mAlertDialogWrongNumberSharing = new AlertDialog.Builder(this) | 248 | mAlertDialogWrongNumberSharing = new AlertDialog.Builder(this) |
244 | .setTitle(R.string.cos_dlg_error_title) | 249 | .setTitle(R.string.cos_dlg_error_title) |
245 | .setMessage(message) | 250 | .setMessage(message) |
... | @@ -248,8 +253,10 @@ public class CouponShareActivity extends Activity implements View.OnClickListene | ... | @@ -248,8 +253,10 @@ public class CouponShareActivity extends Activity implements View.OnClickListene |
248 | }) | 253 | }) |
249 | .show(); | 254 | .show(); |
250 | } | 255 | } |
256 | + } | ||
251 | 257 | ||
252 | private void errorSharingDialog2() { | 258 | private void errorSharingDialog2() { |
259 | + if (!isFinishing()) { | ||
253 | mAlertDialogErrorSharing = new AlertDialog.Builder(this) | 260 | mAlertDialogErrorSharing = new AlertDialog.Builder(this) |
254 | .setTitle(R.string.cos_dlg_error_title2) | 261 | .setTitle(R.string.cos_dlg_error_title2) |
255 | .setMessage(R.string.cos_dlg_error_subtitle2) | 262 | .setMessage(R.string.cos_dlg_error_subtitle2) |
... | @@ -258,8 +265,10 @@ public class CouponShareActivity extends Activity implements View.OnClickListene | ... | @@ -258,8 +265,10 @@ public class CouponShareActivity extends Activity implements View.OnClickListene |
258 | }) | 265 | }) |
259 | .show(); | 266 | .show(); |
260 | } | 267 | } |
268 | + } | ||
261 | 269 | ||
262 | private void showNoAssetsDialog() { | 270 | private void showNoAssetsDialog() { |
271 | + if (!isFinishing()) { | ||
263 | mAlertDialogNoAssets = new AlertDialog.Builder(this) | 272 | mAlertDialogNoAssets = new AlertDialog.Builder(this) |
264 | .setTitle(R.string.cos_coupon_gift) | 273 | .setTitle(R.string.cos_coupon_gift) |
265 | .setMessage(R.string.cos_share_no_assets) | 274 | .setMessage(R.string.cos_share_no_assets) |
... | @@ -269,8 +278,10 @@ public class CouponShareActivity extends Activity implements View.OnClickListene | ... | @@ -269,8 +278,10 @@ public class CouponShareActivity extends Activity implements View.OnClickListene |
269 | }) | 278 | }) |
270 | .show(); | 279 | .show(); |
271 | } | 280 | } |
281 | + } | ||
272 | 282 | ||
273 | private void askSharingDialog() { | 283 | private void askSharingDialog() { |
284 | + if (!isFinishing()) { | ||
274 | mAlertDialogCouponAskSharing = new AlertDialog.Builder(this) | 285 | mAlertDialogCouponAskSharing = new AlertDialog.Builder(this) |
275 | .setTitle(R.string.cos_dlg_positive_coupon_title) | 286 | .setTitle(R.string.cos_dlg_positive_coupon_title) |
276 | .setMessage(R.string.cos_dlg_positive_coupon_subtitle) | 287 | .setMessage(R.string.cos_dlg_positive_coupon_subtitle) |
... | @@ -295,6 +306,7 @@ public class CouponShareActivity extends Activity implements View.OnClickListene | ... | @@ -295,6 +306,7 @@ public class CouponShareActivity extends Activity implements View.OnClickListene |
295 | }) | 306 | }) |
296 | .show(); | 307 | .show(); |
297 | } | 308 | } |
309 | + } | ||
298 | 310 | ||
299 | private final CallbackReceiver<Consumer> mConsumerCallback = new CallbackReceiver<Consumer>() { | 311 | private final CallbackReceiver<Consumer> mConsumerCallback = new CallbackReceiver<Consumer>() { |
300 | @Override | 312 | @Override | ... | ... |
... | @@ -236,6 +236,7 @@ public class CouponsetInfoActivity extends Activity implements View.OnClickListe | ... | @@ -236,6 +236,7 @@ public class CouponsetInfoActivity extends Activity implements View.OnClickListe |
236 | analyticsEvent.setParameter("successful", "true"); | 236 | analyticsEvent.setParameter("successful", "true"); |
237 | EventBus.getDefault().post(new WarplyEventBusManager(analyticsEvent)); | 237 | EventBus.getDefault().post(new WarplyEventBusManager(analyticsEvent)); |
238 | 238 | ||
239 | + if (!isFinishing()) { | ||
239 | mAlertDialogCouponset = new AlertDialog.Builder(this) | 240 | mAlertDialogCouponset = new AlertDialog.Builder(this) |
240 | .setTitle(R.string.cos_dlg_success_couponset_title) | 241 | .setTitle(R.string.cos_dlg_success_couponset_title) |
241 | .setMessage(R.string.cos_dlg_success_couponset_subtitle) | 242 | .setMessage(R.string.cos_dlg_success_couponset_subtitle) |
... | @@ -247,6 +248,7 @@ public class CouponsetInfoActivity extends Activity implements View.OnClickListe | ... | @@ -247,6 +248,7 @@ public class CouponsetInfoActivity extends Activity implements View.OnClickListe |
247 | } | 248 | } |
248 | }) | 249 | }) |
249 | .show(); | 250 | .show(); |
251 | + } | ||
250 | } else { | 252 | } else { |
251 | LoyaltySDKFirebaseEventModel analyticsEvent = new LoyaltySDKFirebaseEventModel(); | 253 | LoyaltySDKFirebaseEventModel analyticsEvent = new LoyaltySDKFirebaseEventModel(); |
252 | analyticsEvent.setEventName("loyalty_offer_activated"); | 254 | analyticsEvent.setEventName("loyalty_offer_activated"); |
... | @@ -256,6 +258,7 @@ public class CouponsetInfoActivity extends Activity implements View.OnClickListe | ... | @@ -256,6 +258,7 @@ public class CouponsetInfoActivity extends Activity implements View.OnClickListe |
256 | EventBus.getDefault().post(new WarplyEventBusManager(analyticsEvent)); | 258 | EventBus.getDefault().post(new WarplyEventBusManager(analyticsEvent)); |
257 | 259 | ||
258 | if (status == 3) { | 260 | if (status == 3) { |
261 | + if (!isFinishing()) { | ||
259 | mAlertDialogCouponset = new AlertDialog.Builder(this) | 262 | mAlertDialogCouponset = new AlertDialog.Builder(this) |
260 | .setTitle(R.string.cos_dlg_error_title) | 263 | .setTitle(R.string.cos_dlg_error_title) |
261 | .setMessage(R.string.cos_dlg_error_subtitle_non_buyable) | 264 | .setMessage(R.string.cos_dlg_error_subtitle_non_buyable) |
... | @@ -263,7 +266,9 @@ public class CouponsetInfoActivity extends Activity implements View.OnClickListe | ... | @@ -263,7 +266,9 @@ public class CouponsetInfoActivity extends Activity implements View.OnClickListe |
263 | dialogPositive.dismiss(); | 266 | dialogPositive.dismiss(); |
264 | }) | 267 | }) |
265 | .show(); | 268 | .show(); |
269 | + } | ||
266 | } else if (status == 5) { | 270 | } else if (status == 5) { |
271 | + if (!isFinishing()) { | ||
267 | mAlertDialogCouponset = new AlertDialog.Builder(this) | 272 | mAlertDialogCouponset = new AlertDialog.Builder(this) |
268 | .setTitle(R.string.cos_dlg_error_title) | 273 | .setTitle(R.string.cos_dlg_error_title) |
269 | .setMessage(R.string.cos_dlg_error_subtitle_no_points) | 274 | .setMessage(R.string.cos_dlg_error_subtitle_no_points) |
... | @@ -271,7 +276,9 @@ public class CouponsetInfoActivity extends Activity implements View.OnClickListe | ... | @@ -271,7 +276,9 @@ public class CouponsetInfoActivity extends Activity implements View.OnClickListe |
271 | dialogPositive.dismiss(); | 276 | dialogPositive.dismiss(); |
272 | }) | 277 | }) |
273 | .show(); | 278 | .show(); |
279 | + } | ||
274 | } else if (status == 6) { | 280 | } else if (status == 6) { |
281 | + if (!isFinishing()) { | ||
275 | mAlertDialogCouponset = new AlertDialog.Builder(this) | 282 | mAlertDialogCouponset = new AlertDialog.Builder(this) |
276 | .setTitle(R.string.cos_dlg_coupon_depleted_title) | 283 | .setTitle(R.string.cos_dlg_coupon_depleted_title) |
277 | .setMessage(R.string.cos_dlg_coupon_depleted_message) | 284 | .setMessage(R.string.cos_dlg_coupon_depleted_message) |
... | @@ -279,7 +286,9 @@ public class CouponsetInfoActivity extends Activity implements View.OnClickListe | ... | @@ -279,7 +286,9 @@ public class CouponsetInfoActivity extends Activity implements View.OnClickListe |
279 | dialogPositive.dismiss(); | 286 | dialogPositive.dismiss(); |
280 | }) | 287 | }) |
281 | .show(); | 288 | .show(); |
289 | + } | ||
282 | } else { | 290 | } else { |
291 | + if (!isFinishing()) { | ||
283 | mAlertDialogCouponset = new AlertDialog.Builder(this) | 292 | mAlertDialogCouponset = new AlertDialog.Builder(this) |
284 | .setTitle(R.string.cos_dlg_error_title) | 293 | .setTitle(R.string.cos_dlg_error_title) |
285 | .setMessage(R.string.cos_dlg_error_subtitle) | 294 | .setMessage(R.string.cos_dlg_error_subtitle) |
... | @@ -290,8 +299,10 @@ public class CouponsetInfoActivity extends Activity implements View.OnClickListe | ... | @@ -290,8 +299,10 @@ public class CouponsetInfoActivity extends Activity implements View.OnClickListe |
290 | } | 299 | } |
291 | } | 300 | } |
292 | } | 301 | } |
302 | + } | ||
293 | 303 | ||
294 | private void nonTelcoDialog() { | 304 | private void nonTelcoDialog() { |
305 | + if (!isFinishing()) { | ||
295 | mAlertDialogNonTelco = new AlertDialog.Builder(this) | 306 | mAlertDialogNonTelco = new AlertDialog.Builder(this) |
296 | .setTitle(R.string.cos_dlg_non_telco_title) | 307 | .setTitle(R.string.cos_dlg_non_telco_title) |
297 | .setMessage(R.string.cos_dlg_non_telco) | 308 | .setMessage(R.string.cos_dlg_non_telco) |
... | @@ -302,6 +313,7 @@ public class CouponsetInfoActivity extends Activity implements View.OnClickListe | ... | @@ -302,6 +313,7 @@ public class CouponsetInfoActivity extends Activity implements View.OnClickListe |
302 | .setCancelable(false) | 313 | .setCancelable(false) |
303 | .show(); | 314 | .show(); |
304 | } | 315 | } |
316 | + } | ||
305 | 317 | ||
306 | // =========================================================== | 318 | // =========================================================== |
307 | // Inner and Anonymous Classes | 319 | // Inner and Anonymous Classes | ... | ... |
... | @@ -514,6 +514,7 @@ public class LoyaltyWallet extends Activity implements View.OnClickListener, Vie | ... | @@ -514,6 +514,7 @@ public class LoyaltyWallet extends Activity implements View.OnClickListener, Vie |
514 | } | 514 | } |
515 | 515 | ||
516 | private void nonTelcoDialog() { | 516 | private void nonTelcoDialog() { |
517 | + if (!isFinishing()) { | ||
517 | mAlertDialogNonTelco = new AlertDialog.Builder(this) | 518 | mAlertDialogNonTelco = new AlertDialog.Builder(this) |
518 | .setTitle(R.string.cos_dlg_non_telco_title) | 519 | .setTitle(R.string.cos_dlg_non_telco_title) |
519 | .setMessage(R.string.cos_dlg_non_telco) | 520 | .setMessage(R.string.cos_dlg_non_telco) |
... | @@ -524,6 +525,7 @@ public class LoyaltyWallet extends Activity implements View.OnClickListener, Vie | ... | @@ -524,6 +525,7 @@ public class LoyaltyWallet extends Activity implements View.OnClickListener, Vie |
524 | .setCancelable(false) | 525 | .setCancelable(false) |
525 | .show(); | 526 | .show(); |
526 | } | 527 | } |
528 | + } | ||
527 | 529 | ||
528 | // =========================================================== | 530 | // =========================================================== |
529 | // Inner and Anonymous Classes | 531 | // Inner and Anonymous Classes | ... | ... |
... | @@ -265,6 +265,7 @@ public class ShopsActivity extends FragmentActivity implements View.OnClickListe | ... | @@ -265,6 +265,7 @@ public class ShopsActivity extends FragmentActivity implements View.OnClickListe |
265 | // =========================================================== | 265 | // =========================================================== |
266 | 266 | ||
267 | private void showNoShopsAvailableDialog() { | 267 | private void showNoShopsAvailableDialog() { |
268 | + if (!isFinishing()) { | ||
268 | mAlertDialogNoShopsAvailable = new AlertDialog.Builder(this) | 269 | mAlertDialogNoShopsAvailable = new AlertDialog.Builder(this) |
269 | .setTitle(R.string.cos_dlg_no_shops_title) | 270 | .setTitle(R.string.cos_dlg_no_shops_title) |
270 | .setMessage(R.string.cos_dlg_no_shops) | 271 | .setMessage(R.string.cos_dlg_no_shops) |
... | @@ -280,6 +281,7 @@ public class ShopsActivity extends FragmentActivity implements View.OnClickListe | ... | @@ -280,6 +281,7 @@ public class ShopsActivity extends FragmentActivity implements View.OnClickListe |
280 | }) | 281 | }) |
281 | .show(); | 282 | .show(); |
282 | } | 283 | } |
284 | + } | ||
283 | 285 | ||
284 | private void openWebsite() { | 286 | private void openWebsite() { |
285 | WarplyAnalyticsManager.logTrackersEvent(this, "click", "SeeShopWebsite"); | 287 | WarplyAnalyticsManager.logTrackersEvent(this, "click", "SeeShopWebsite"); | ... | ... |
... | @@ -259,6 +259,7 @@ public class TelcoActivity extends Activity implements View.OnClickListener { | ... | @@ -259,6 +259,7 @@ public class TelcoActivity extends Activity implements View.OnClickListener { |
259 | } | 259 | } |
260 | 260 | ||
261 | private void askActivateDialog() { | 261 | private void askActivateDialog() { |
262 | + if (!isFinishing()) { | ||
262 | mAlertDialogAskActivate = new AlertDialog.Builder(this) | 263 | mAlertDialogAskActivate = new AlertDialog.Builder(this) |
263 | .setTitle(R.string.cos_dlg_activate_telco_title) | 264 | .setTitle(R.string.cos_dlg_activate_telco_title) |
264 | .setMessage(R.string.cos_dlg_activate_telco_subtitle) | 265 | .setMessage(R.string.cos_dlg_activate_telco_subtitle) |
... | @@ -270,6 +271,7 @@ public class TelcoActivity extends Activity implements View.OnClickListener { | ... | @@ -270,6 +271,7 @@ public class TelcoActivity extends Activity implements View.OnClickListener { |
270 | }) | 271 | }) |
271 | .show(); | 272 | .show(); |
272 | } | 273 | } |
274 | + } | ||
273 | 275 | ||
274 | private void errorActivatingDialog() { | 276 | private void errorActivatingDialog() { |
275 | LoyaltySDKFirebaseEventModel analyticsEvent = new LoyaltySDKFirebaseEventModel(); | 277 | LoyaltySDKFirebaseEventModel analyticsEvent = new LoyaltySDKFirebaseEventModel(); |
... | @@ -279,6 +281,7 @@ public class TelcoActivity extends Activity implements View.OnClickListener { | ... | @@ -279,6 +281,7 @@ public class TelcoActivity extends Activity implements View.OnClickListener { |
279 | analyticsEvent.setParameter("successful", "false"); | 281 | analyticsEvent.setParameter("successful", "false"); |
280 | EventBus.getDefault().post(new WarplyEventBusManager(analyticsEvent)); | 282 | EventBus.getDefault().post(new WarplyEventBusManager(analyticsEvent)); |
281 | 283 | ||
284 | + if (!isFinishing()) { | ||
282 | mAlertDialogErrorActivating = new AlertDialog.Builder(this) | 285 | mAlertDialogErrorActivating = new AlertDialog.Builder(this) |
283 | .setTitle(R.string.cos_dlg_error_title) | 286 | .setTitle(R.string.cos_dlg_error_title) |
284 | .setMessage(R.string.cos_dlg_error_subtitle) | 287 | .setMessage(R.string.cos_dlg_error_subtitle) |
... | @@ -287,6 +290,7 @@ public class TelcoActivity extends Activity implements View.OnClickListener { | ... | @@ -287,6 +290,7 @@ public class TelcoActivity extends Activity implements View.OnClickListener { |
287 | }) | 290 | }) |
288 | .show(); | 291 | .show(); |
289 | } | 292 | } |
293 | + } | ||
290 | 294 | ||
291 | private void successActivatingDialog() { | 295 | private void successActivatingDialog() { |
292 | LoyaltySDKFirebaseEventModel analyticsEvent = new LoyaltySDKFirebaseEventModel(); | 296 | LoyaltySDKFirebaseEventModel analyticsEvent = new LoyaltySDKFirebaseEventModel(); |
... | @@ -296,6 +300,7 @@ public class TelcoActivity extends Activity implements View.OnClickListener { | ... | @@ -296,6 +300,7 @@ public class TelcoActivity extends Activity implements View.OnClickListener { |
296 | analyticsEvent.setParameter("successful", "true"); | 300 | analyticsEvent.setParameter("successful", "true"); |
297 | EventBus.getDefault().post(new WarplyEventBusManager(analyticsEvent)); | 301 | EventBus.getDefault().post(new WarplyEventBusManager(analyticsEvent)); |
298 | 302 | ||
303 | + if (!isFinishing()) { | ||
299 | mAlertDialogSuccessActivating = new AlertDialog.Builder(this) | 304 | mAlertDialogSuccessActivating = new AlertDialog.Builder(this) |
300 | .setTitle(R.string.cos_dlg_activate_success_title) | 305 | .setTitle(R.string.cos_dlg_activate_success_title) |
301 | .setMessage(R.string.cos_dlg_activate_success_subtitle) | 306 | .setMessage(R.string.cos_dlg_activate_success_subtitle) |
... | @@ -304,6 +309,7 @@ public class TelcoActivity extends Activity implements View.OnClickListener { | ... | @@ -304,6 +309,7 @@ public class TelcoActivity extends Activity implements View.OnClickListener { |
304 | }) | 309 | }) |
305 | .show(); | 310 | .show(); |
306 | } | 311 | } |
312 | + } | ||
307 | 313 | ||
308 | // =========================================================== | 314 | // =========================================================== |
309 | // Inner and Anonymous Classes | 315 | // Inner and Anonymous Classes | ... | ... |
... | @@ -16,8 +16,8 @@ | ... | @@ -16,8 +16,8 @@ |
16 | android:layout_width="48dp" | 16 | android:layout_width="48dp" |
17 | android:layout_height="48dp" | 17 | android:layout_height="48dp" |
18 | android:layout_marginStart="16dp" | 18 | android:layout_marginStart="16dp" |
19 | - android:src="@drawable/ic_back" | ||
20 | android:scaleType="centerInside" | 19 | android:scaleType="centerInside" |
20 | + android:src="@drawable/ic_back" | ||
21 | app:layout_constraintBottom_toBottomOf="parent" | 21 | app:layout_constraintBottom_toBottomOf="parent" |
22 | app:layout_constraintStart_toStartOf="parent" | 22 | app:layout_constraintStart_toStartOf="parent" |
23 | app:layout_constraintTop_toTopOf="parent" /> | 23 | app:layout_constraintTop_toTopOf="parent" /> |
... | @@ -39,21 +39,17 @@ | ... | @@ -39,21 +39,17 @@ |
39 | android:layout_width="match_parent" | 39 | android:layout_width="match_parent" |
40 | android:layout_height="match_parent" | 40 | android:layout_height="match_parent" |
41 | android:layout_below="@+id/cl_loyalty_wallet_header" | 41 | android:layout_below="@+id/cl_loyalty_wallet_header" |
42 | + android:background="@android:color/white" | ||
42 | android:fillViewport="true"> | 43 | android:fillViewport="true"> |
43 | 44 | ||
44 | - <RelativeLayout | 45 | + <LinearLayout |
45 | - android:layout_width="match_parent" | ||
46 | - android:layout_height="match_parent" | ||
47 | - android:background="@android:color/white"> | ||
48 | - | ||
49 | - <!-- android:background="@drawable/shape_cos_loyalty_white"--> | ||
50 | - <androidx.constraintlayout.widget.ConstraintLayout | ||
51 | android:id="@+id/cl_loyalty_info_view_inner" | 46 | android:id="@+id/cl_loyalty_info_view_inner" |
52 | android:layout_width="match_parent" | 47 | android:layout_width="match_parent" |
53 | - android:layout_height="match_parent" | 48 | + android:layout_height="wrap_content" |
54 | - app:layout_constraintEnd_toEndOf="parent" | 49 | + android:background="@android:color/white" |
55 | - app:layout_constraintStart_toStartOf="parent" | 50 | + android:gravity="center_horizontal" |
56 | - app:layout_constraintTop_toTopOf="parent"> | 51 | + android:orientation="vertical" |
52 | + android:paddingBottom="48dp"> | ||
57 | 53 | ||
58 | <ImageView | 54 | <ImageView |
59 | android:id="@+id/imageView6" | 55 | android:id="@+id/imageView6" |
... | @@ -61,20 +57,8 @@ | ... | @@ -61,20 +57,8 @@ |
61 | android:layout_height="253dp" | 57 | android:layout_height="253dp" |
62 | android:layout_marginTop="0.5dp" | 58 | android:layout_marginTop="0.5dp" |
63 | android:scaleType="centerCrop" | 59 | android:scaleType="centerCrop" |
64 | - app:layout_constraintStart_toStartOf="parent" | ||
65 | - app:layout_constraintTop_toTopOf="parent" | ||
66 | tools:src="@drawable/carousel_banner" /> | 60 | tools:src="@drawable/carousel_banner" /> |
67 | 61 | ||
68 | - <LinearLayout | ||
69 | - android:layout_width="match_parent" | ||
70 | - android:layout_height="wrap_content" | ||
71 | - android:background="@drawable/ic_line" | ||
72 | - app:layout_constraintEnd_toEndOf="parent" | ||
73 | - app:layout_constraintStart_toStartOf="parent" | ||
74 | - app:layout_constraintTop_toTopOf="@+id/imageView6"> | ||
75 | - | ||
76 | - </LinearLayout> | ||
77 | - | ||
78 | <TextView | 62 | <TextView |
79 | android:id="@+id/textView13" | 63 | android:id="@+id/textView13" |
80 | fontPath="fonts/pf_square_sans_pro_medium.ttf" | 64 | fontPath="fonts/pf_square_sans_pro_medium.ttf" |
... | @@ -85,10 +69,6 @@ | ... | @@ -85,10 +69,6 @@ |
85 | android:paddingHorizontal="32dp" | 69 | android:paddingHorizontal="32dp" |
86 | android:textColor="#415564" | 70 | android:textColor="#415564" |
87 | android:textSize="18sp" | 71 | android:textSize="18sp" |
88 | - app:layout_constraintEnd_toEndOf="parent" | ||
89 | - app:layout_constraintHorizontal_bias="0.509" | ||
90 | - app:layout_constraintStart_toStartOf="parent" | ||
91 | - app:layout_constraintTop_toBottomOf="@+id/imageView6" | ||
92 | tools:text="Πάρε δωρεάν μηνιαία πακέτα με πάνες στα supermarket Σκλαβενίτης!" /> | 72 | tools:text="Πάρε δωρεάν μηνιαία πακέτα με πάνες στα supermarket Σκλαβενίτης!" /> |
93 | 73 | ||
94 | <TextView | 74 | <TextView |
... | @@ -101,9 +81,6 @@ | ... | @@ -101,9 +81,6 @@ |
101 | android:paddingHorizontal="32dp" | 81 | android:paddingHorizontal="32dp" |
102 | android:textColor="#415564" | 82 | android:textColor="#415564" |
103 | android:textSize="16sp" | 83 | android:textSize="16sp" |
104 | - app:layout_constraintEnd_toEndOf="parent" | ||
105 | - app:layout_constraintStart_toStartOf="parent" | ||
106 | - app:layout_constraintTop_toBottomOf="@+id/textView13" | ||
107 | tools:text="Χρησιμοποίησε τον παρακάτω κωδικό και πάρε δωρεάν πακέτο πάνες Pampers αποκλειστικά στα Supermarket Σκλαβενίτης" /> | 84 | tools:text="Χρησιμοποίησε τον παρακάτω κωδικό και πάρε δωρεάν πακέτο πάνες Pampers αποκλειστικά στα Supermarket Σκλαβενίτης" /> |
108 | 85 | ||
109 | <LinearLayout | 86 | <LinearLayout |
... | @@ -111,13 +88,10 @@ | ... | @@ -111,13 +88,10 @@ |
111 | android:layout_width="240dp" | 88 | android:layout_width="240dp" |
112 | android:layout_height="50dp" | 89 | android:layout_height="50dp" |
113 | android:layout_marginHorizontal="32dp" | 90 | android:layout_marginHorizontal="32dp" |
114 | - android:layout_marginBottom="32dp" | 91 | + android:layout_marginTop="@dimen/marginTop" |
115 | android:background="@drawable/selector_button_green" | 92 | android:background="@drawable/selector_button_green" |
116 | android:gravity="center" | 93 | android:gravity="center" |
117 | - android:orientation="horizontal" | 94 | + android:orientation="horizontal"> |
118 | - app:layout_constraintBottom_toTopOf="@+id/rl_terms" | ||
119 | - app:layout_constraintEnd_toEndOf="parent" | ||
120 | - app:layout_constraintStart_toStartOf="parent"> | ||
121 | 95 | ||
122 | <TextView | 96 | <TextView |
123 | fontPath="fonts/pf_square_sans_pro_medium.ttf" | 97 | fontPath="fonts/pf_square_sans_pro_medium.ttf" |
... | @@ -133,11 +107,8 @@ | ... | @@ -133,11 +107,8 @@ |
133 | android:id="@+id/rl_terms" | 107 | android:id="@+id/rl_terms" |
134 | android:layout_width="wrap_content" | 108 | android:layout_width="wrap_content" |
135 | android:layout_height="wrap_content" | 109 | android:layout_height="wrap_content" |
136 | - android:layout_marginVertical="32dp" | 110 | + android:layout_marginTop="32dp" |
137 | - android:gravity="center" | 111 | + android:gravity="center"> |
138 | - app:layout_constraintBottom_toBottomOf="parent" | ||
139 | - app:layout_constraintEnd_toEndOf="parent" | ||
140 | - app:layout_constraintStart_toStartOf="parent"> | ||
141 | 112 | ||
142 | <LinearLayout | 113 | <LinearLayout |
143 | android:id="@+id/ll_terms_inner" | 114 | android:id="@+id/ll_terms_inner" |
... | @@ -161,7 +132,6 @@ | ... | @@ -161,7 +132,6 @@ |
161 | android:layout_width="14dp" | 132 | android:layout_width="14dp" |
162 | android:layout_height="14dp" | 133 | android:layout_height="14dp" |
163 | android:layout_marginStart="6dp" | 134 | android:layout_marginStart="6dp" |
164 | - android:layout_marginTop="2dp" | ||
165 | android:src="@drawable/ic_down_dark_new" /> | 135 | android:src="@drawable/ic_down_dark_new" /> |
166 | </LinearLayout> | 136 | </LinearLayout> |
167 | 137 | ||
... | @@ -171,28 +141,32 @@ | ... | @@ -171,28 +141,32 @@ |
171 | android:layout_width="wrap_content" | 141 | android:layout_width="wrap_content" |
172 | android:layout_height="wrap_content" | 142 | android:layout_height="wrap_content" |
173 | android:layout_below="@+id/ll_terms_inner" | 143 | android:layout_below="@+id/ll_terms_inner" |
174 | - android:layout_marginTop="16dp" | ||
175 | android:layout_marginHorizontal="64dp" | 144 | android:layout_marginHorizontal="64dp" |
145 | + android:layout_marginTop="16dp" | ||
176 | android:textColor="@color/grey" | 146 | android:textColor="@color/grey" |
177 | android:visibility="gone" | 147 | android:visibility="gone" |
178 | tools:text="@string/cos_coupon_date" | 148 | tools:text="@string/cos_coupon_date" |
179 | - tools:visibility="visible" /> | 149 | + tools:visibility="gone" /> |
180 | </RelativeLayout> | 150 | </RelativeLayout> |
151 | + </LinearLayout> | ||
152 | + </ScrollView> | ||
153 | + | ||
154 | + <LinearLayout | ||
155 | + android:layout_width="match_parent" | ||
156 | + android:layout_height="wrap_content" | ||
157 | + android:layout_marginTop="48dp" | ||
158 | + android:background="@drawable/ic_line"> | ||
159 | + | ||
160 | + </LinearLayout> | ||
181 | 161 | ||
182 | <ProgressBar | 162 | <ProgressBar |
183 | android:id="@+id/pb_loading" | 163 | android:id="@+id/pb_loading" |
184 | android:layout_width="48dp" | 164 | android:layout_width="48dp" |
185 | android:layout_height="48dp" | 165 | android:layout_height="48dp" |
166 | + android:layout_centerInParent="true" | ||
186 | android:indeterminate="true" | 167 | android:indeterminate="true" |
187 | android:indeterminateTint="@color/cos_green5" | 168 | android:indeterminateTint="@color/cos_green5" |
188 | android:indeterminateTintMode="src_atop" | 169 | android:indeterminateTintMode="src_atop" |
189 | android:visibility="gone" | 170 | android:visibility="gone" |
190 | - app:layout_constraintBottom_toBottomOf="parent" | ||
191 | - app:layout_constraintEnd_toEndOf="parent" | ||
192 | - app:layout_constraintStart_toStartOf="parent" | ||
193 | - app:layout_constraintTop_toTopOf="parent" | ||
194 | tools:visibility="visible" /> | 171 | tools:visibility="visible" /> |
195 | - </androidx.constraintlayout.widget.ConstraintLayout> | ||
196 | - </RelativeLayout> | ||
197 | - </ScrollView> | ||
198 | </RelativeLayout> | 172 | </RelativeLayout> | ... | ... |
-
Please register or login to post a comment