Panagiotis Triantafyllou

minor fixes

...@@ -262,21 +262,36 @@ public class HomeActivity extends Activity implements View.OnClickListener, Coup ...@@ -262,21 +262,36 @@ public class HomeActivity extends Activity implements View.OnClickListener, Coup
262 262
263 mBannerAdapter = new CarouselAdapter(this, WarplyManagerHelper.getCarouselList()); 263 mBannerAdapter = new CarouselAdapter(this, WarplyManagerHelper.getCarouselList());
264 mBannerAdapter.setOnBannerClickListener(carouselItem -> { 264 mBannerAdapter.setOnBannerClickListener(carouselItem -> {
265 - if (!TextUtils.isEmpty(carouselItem.getUrl())) { 265 +// if (!TextUtils.isEmpty(carouselItem.getUrl())) {
266 - if (carouselItem.getUrl().contains("Offers?")) { 266 +// if (carouselItem.getUrl().contains("Offers?")) {
267 - //TODO: category uuid 267 +// //TODO: category uuid
268 - } else if (carouselItem.getUrl().contains("singleOffer")) { 268 +// } else if (carouselItem.getUrl().contains("singleOffer")) {
269 - if (!TextUtils.isEmpty(carouselItem.getUuid())) { 269 +// if (!TextUtils.isEmpty(carouselItem.getUuid())) {
270 - Couponset matchedCouponset = findCouponsetByUuid(carouselItem.getUuid()); 270 +// Couponset matchedCouponset = findCouponsetByUuid(carouselItem.getUuid());
271 - if (matchedCouponset != null) { 271 +// if (matchedCouponset != null) {
272 - Intent myIntent = new Intent(HomeActivity.this, SingleCouponsetActivity.class); 272 +// Intent myIntent = new Intent(HomeActivity.this, SingleCouponsetActivity.class);
273 - myIntent.putExtra(SingleCouponsetActivity.EXTRA_OFFER_ITEM, (Parcelable) matchedCouponset); 273 +// myIntent.putExtra(SingleCouponsetActivity.EXTRA_OFFER_ITEM, (Parcelable) matchedCouponset);
274 - startActivity(myIntent); 274 +// startActivity(myIntent);
275 - } 275 +// }
276 - } 276 +// }
277 - } else if (carouselItem.getUrl().contains("index.html")) { 277 +// } else if (carouselItem.getUrl().contains("index.html")) {
278 +// startActivity(WarpViewActivity.createIntentFromURL(this, WarplyManagerHelper.constructCampaignUrl(carouselItem.getUrl())));
279 +// }
280 +// }
281 +
282 + if (carouselItem.getEntity().equalsIgnoreCase("contest")) {
283 + if (!TextUtils.isEmpty(carouselItem.getUrl())) {
278 startActivity(WarpViewActivity.createIntentFromURL(this, WarplyManagerHelper.constructCampaignUrl(carouselItem.getUrl()))); 284 startActivity(WarpViewActivity.createIntentFromURL(this, WarplyManagerHelper.constructCampaignUrl(carouselItem.getUrl())));
279 } 285 }
286 + } else if (carouselItem.getEntity().equalsIgnoreCase("offer")) {
287 + if (!TextUtils.isEmpty(carouselItem.getUrl())) {
288 + Couponset matchedCouponset = findCouponsetByUuid(carouselItem.getUuid());
289 + if (matchedCouponset != null) {
290 + Intent myIntent = new Intent(HomeActivity.this, SingleCouponsetActivity.class);
291 + myIntent.putExtra(SingleCouponsetActivity.EXTRA_OFFER_ITEM, (Parcelable) matchedCouponset);
292 + startActivity(myIntent);
293 + }
294 + }
280 } 295 }
281 }); 296 });
282 297
......
...@@ -44,6 +44,7 @@ ...@@ -44,6 +44,7 @@
44 </LinearLayout> 44 </LinearLayout>
45 45
46 <ScrollView 46 <ScrollView
47 + android:id="@+id/sv_main"
47 android:layout_width="match_parent" 48 android:layout_width="match_parent"
48 android:layout_height="0dp" 49 android:layout_height="0dp"
49 android:fillViewport="true" 50 android:fillViewport="true"
...@@ -53,8 +54,9 @@ ...@@ -53,8 +54,9 @@
53 54
54 <LinearLayout 55 <LinearLayout
55 android:layout_width="match_parent" 56 android:layout_width="match_parent"
56 - android:layout_height="wrap_content" 57 + android:layout_height="0dp"
57 android:orientation="vertical" 58 android:orientation="vertical"
59 + android:weightSum="1"
58 android:paddingHorizontal="16dp" 60 android:paddingHorizontal="16dp"
59 android:paddingBottom="32dp"> 61 android:paddingBottom="32dp">
60 62
...@@ -102,8 +104,12 @@ ...@@ -102,8 +104,12 @@
102 android:layout_width="match_parent" 104 android:layout_width="match_parent"
103 android:layout_height="wrap_content" 105 android:layout_height="wrap_content"
104 android:orientation="vertical" 106 android:orientation="vertical"
105 - android:padding="16dp" 107 + android:paddingHorizontal="16dp"
106 - app:layout_constraintBottom_toBottomOf="parent"> 108 + android:paddingTop="16dp"
109 + android:paddingBottom="16dp"
110 + android:translationZ="100dp"
111 + app:layout_constraintBottom_toBottomOf="parent"
112 + app:layout_constraintTop_toBottomOf="@+id/sv_main">
107 113
108 <LinearLayout 114 <LinearLayout
109 android:id="@+id/ll_next_button" 115 android:id="@+id/ll_next_button"
......