Showing
22 changed files
with
350 additions
and
143 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-cosbeta16' | 5 | + PUBLISH_VERSION = '4.5.4-cosbeta17' |
6 | PUBLISH_ARTIFACT_ID = 'warply-android-sdk' | 6 | PUBLISH_ARTIFACT_ID = 'warply-android-sdk' |
7 | } | 7 | } |
8 | 8 | ... | ... |
... | @@ -43,17 +43,17 @@ public class LoyaltyWallet extends Activity implements View.OnClickListener { | ... | @@ -43,17 +43,17 @@ public class LoyaltyWallet extends Activity implements View.OnClickListener { |
43 | // Fields | 43 | // Fields |
44 | // =========================================================== | 44 | // =========================================================== |
45 | 45 | ||
46 | - private ImageView mIvBack; | 46 | + private ImageView mIvBack, mIvDealsLogo; |
47 | private TextView mTvUsername, mTvDealsValue, mTvDealsValueAll, | 47 | private TextView mTvUsername, mTvDealsValue, mTvDealsValueAll, |
48 | mTvUserBadge, mTvGiftsValue, mTvGiftsValueAll, mTvActiveCode, mTvActiveDate; | 48 | mTvUserBadge, mTvGiftsValue, mTvGiftsValueAll, mTvActiveCode, mTvActiveDate; |
49 | - private ConstraintLayout mClDealsBanner, | 49 | + private ConstraintLayout mClDealsBanner, mClDealsView, |
50 | mClGiftsBanner; | 50 | mClGiftsBanner; |
51 | private LinearLayout mLlQuestionnaire, mLlUserBadge; | 51 | private LinearLayout mLlQuestionnaire, mLlUserBadge; |
52 | float couponValue = 0.0f, couponDfyValue = 0.0f; | 52 | float couponValue = 0.0f, couponDfyValue = 0.0f; |
53 | int couponCount = 0; | 53 | int couponCount = 0; |
54 | private RecyclerView mRecyclerCoupons; | 54 | private RecyclerView mRecyclerCoupons; |
55 | private ActiveCouponAdapter mAdapterCoupons; | 55 | private ActiveCouponAdapter mAdapterCoupons; |
56 | - CouponList cpnlist = new CouponList(); | 56 | + private CouponList cpnlist = new CouponList(); |
57 | 57 | ||
58 | // =========================================================== | 58 | // =========================================================== |
59 | // Methods for/from SuperClass/Interfaces | 59 | // Methods for/from SuperClass/Interfaces |
... | @@ -77,6 +77,8 @@ public class LoyaltyWallet extends Activity implements View.OnClickListener { | ... | @@ -77,6 +77,8 @@ public class LoyaltyWallet extends Activity implements View.OnClickListener { |
77 | mTvDealsValueAll = findViewById(R.id.tv_deals_value_all); | 77 | mTvDealsValueAll = findViewById(R.id.tv_deals_value_all); |
78 | mTvActiveCode = findViewById(R.id.tv_active_deals_text); | 78 | mTvActiveCode = findViewById(R.id.tv_active_deals_text); |
79 | mTvActiveDate = findViewById(R.id.tv_active_deals_date_text); | 79 | mTvActiveDate = findViewById(R.id.tv_active_deals_date_text); |
80 | + mIvDealsLogo = findViewById(R.id.dfy_logo); | ||
81 | + mClDealsView = findViewById(R.id.cl_mygifts); | ||
80 | 82 | ||
81 | if (WarplyManagerHelper.getActiveDFYCoupons() != null) { | 83 | if (WarplyManagerHelper.getActiveDFYCoupons() != null) { |
82 | Collections.sort(WarplyManagerHelper.getActiveDFYCoupons(), new Comparator<ActiveDFYCouponModel>() { | 84 | Collections.sort(WarplyManagerHelper.getActiveDFYCoupons(), new Comparator<ActiveDFYCouponModel>() { |
... | @@ -138,7 +140,7 @@ public class LoyaltyWallet extends Activity implements View.OnClickListener { | ... | @@ -138,7 +140,7 @@ public class LoyaltyWallet extends Activity implements View.OnClickListener { |
138 | return; | 140 | return; |
139 | } | 141 | } |
140 | if (view.getId() == R.id.cl_deals_win) { | 142 | if (view.getId() == R.id.cl_deals_win) { |
141 | - | 143 | + //TODO: Loyalty history |
142 | } | 144 | } |
143 | } | 145 | } |
144 | 146 | ||
... | @@ -178,6 +180,9 @@ public class LoyaltyWallet extends Activity implements View.OnClickListener { | ... | @@ -178,6 +180,9 @@ public class LoyaltyWallet extends Activity implements View.OnClickListener { |
178 | } catch (ParseException e) { | 180 | } catch (ParseException e) { |
179 | e.printStackTrace(); | 181 | e.printStackTrace(); |
180 | } | 182 | } |
183 | + } else { | ||
184 | + mIvDealsLogo.setVisibility(View.GONE); | ||
185 | + mClDealsView.setVisibility(View.GONE); | ||
181 | } | 186 | } |
182 | 187 | ||
183 | if (WarplyManagerHelper.getConsumer() != null) { | 188 | if (WarplyManagerHelper.getConsumer() != null) { | ... | ... |
... | @@ -25,16 +25,15 @@ | ... | @@ -25,16 +25,15 @@ |
25 | 25 | ||
26 | package ly.warp.sdk.activities; | 26 | package ly.warp.sdk.activities; |
27 | 27 | ||
28 | +import static ly.warp.sdk.utils.constants.WarpConstants.RANDOM_MAX; | ||
29 | +import static ly.warp.sdk.utils.constants.WarpConstants.RANDOM_MIN; | ||
30 | + | ||
28 | import android.content.Context; | 31 | import android.content.Context; |
29 | import android.content.Intent; | 32 | import android.content.Intent; |
30 | import android.graphics.Color; | 33 | import android.graphics.Color; |
31 | import android.os.Build; | 34 | import android.os.Build; |
32 | import android.os.Bundle; | 35 | import android.os.Bundle; |
33 | - | ||
34 | -import androidx.annotation.NonNull; | ||
35 | - | ||
36 | import android.text.TextUtils; | 36 | import android.text.TextUtils; |
37 | -import android.util.Log; | ||
38 | import android.view.KeyEvent; | 37 | import android.view.KeyEvent; |
39 | import android.view.View; | 38 | import android.view.View; |
40 | import android.webkit.WebView; | 39 | import android.webkit.WebView; |
... | @@ -42,15 +41,20 @@ import android.widget.ImageView; | ... | @@ -42,15 +41,20 @@ import android.widget.ImageView; |
42 | import android.widget.ProgressBar; | 41 | import android.widget.ProgressBar; |
43 | import android.widget.RelativeLayout; | 42 | import android.widget.RelativeLayout; |
44 | 43 | ||
45 | -import java.security.SecureRandom; | 44 | +import androidx.annotation.NonNull; |
46 | -import java.util.concurrent.ThreadLocalRandom; | ||
47 | -import java.util.concurrent.TimeUnit; | ||
48 | - | ||
49 | import androidx.work.Constraints; | 45 | import androidx.work.Constraints; |
50 | import androidx.work.NetworkType; | 46 | import androidx.work.NetworkType; |
51 | import androidx.work.OneTimeWorkRequest; | 47 | import androidx.work.OneTimeWorkRequest; |
52 | import androidx.work.WorkManager; | 48 | import androidx.work.WorkManager; |
53 | 49 | ||
50 | +import org.greenrobot.eventbus.EventBus; | ||
51 | +import org.greenrobot.eventbus.Subscribe; | ||
52 | + | ||
53 | +import java.security.SecureRandom; | ||
54 | +import java.util.concurrent.ThreadLocalRandom; | ||
55 | +import java.util.concurrent.TimeUnit; | ||
56 | + | ||
57 | +import ly.warp.sdk.R; | ||
54 | import ly.warp.sdk.Warply; | 58 | import ly.warp.sdk.Warply; |
55 | import ly.warp.sdk.services.PushEventsClickedWorkerService; | 59 | import ly.warp.sdk.services.PushEventsClickedWorkerService; |
56 | import ly.warp.sdk.utils.WarpJSONParser; | 60 | import ly.warp.sdk.utils.WarpJSONParser; |
... | @@ -62,12 +66,6 @@ import ly.warp.sdk.utils.managers.WarplyEventBusManager; | ... | @@ -62,12 +66,6 @@ import ly.warp.sdk.utils.managers.WarplyEventBusManager; |
62 | import ly.warp.sdk.utils.managers.WarplySessionManager; | 66 | import ly.warp.sdk.utils.managers.WarplySessionManager; |
63 | import ly.warp.sdk.views.WarpView; | 67 | import ly.warp.sdk.views.WarpView; |
64 | 68 | ||
65 | -import static ly.warp.sdk.utils.constants.WarpConstants.RANDOM_MAX; | ||
66 | -import static ly.warp.sdk.utils.constants.WarpConstants.RANDOM_MIN; | ||
67 | - | ||
68 | -import org.greenrobot.eventbus.EventBus; | ||
69 | -import org.greenrobot.eventbus.Subscribe; | ||
70 | - | ||
71 | public class WarpViewActivity extends WarpBaseActivity { | 69 | public class WarpViewActivity extends WarpBaseActivity { |
72 | 70 | ||
73 | // =========================================================== | 71 | // =========================================================== |
... | @@ -83,6 +81,8 @@ public class WarpViewActivity extends WarpBaseActivity { | ... | @@ -83,6 +81,8 @@ public class WarpViewActivity extends WarpBaseActivity { |
83 | @Override | 81 | @Override |
84 | public void onCreate(Bundle savedInstanceState) { | 82 | public void onCreate(Bundle savedInstanceState) { |
85 | super.onCreate(savedInstanceState); | 83 | super.onCreate(savedInstanceState); |
84 | + setContentView(R.layout.activity_loyalty_wallet); | ||
85 | + | ||
86 | WarplySessionManager.onCreateActivity(this); | 86 | WarplySessionManager.onCreateActivity(this); |
87 | initViews(); | 87 | initViews(); |
88 | Warply.getInitializer(this).init(); | 88 | Warply.getInitializer(this).init(); |
... | @@ -129,6 +129,10 @@ public class WarpViewActivity extends WarpBaseActivity { | ... | @@ -129,6 +129,10 @@ public class WarpViewActivity extends WarpBaseActivity { |
129 | EventBus.getDefault().post(new WarplyEventBusManager(event.getQuestionnaire())); | 129 | EventBus.getDefault().post(new WarplyEventBusManager(event.getQuestionnaire())); |
130 | if (event.getCoupon() != null) | 130 | if (event.getCoupon() != null) |
131 | EventBus.getDefault().post(new WarplyEventBusManager(event.getCoupon())); | 131 | EventBus.getDefault().post(new WarplyEventBusManager(event.getCoupon())); |
132 | + if (event.getPacingCard() != null) | ||
133 | + EventBus.getDefault().post(new WarplyEventBusManager(event.getPacingCard())); | ||
134 | + if (event.getPacingService() != null) | ||
135 | + EventBus.getDefault().post(new WarplyEventBusManager(event.getPacingService())); | ||
132 | finish(); | 136 | finish(); |
133 | } | 137 | } |
134 | 138 | ... | ... |
... | @@ -34,7 +34,7 @@ public class CouponEventModel { | ... | @@ -34,7 +34,7 @@ public class CouponEventModel { |
34 | private boolean success; | 34 | private boolean success; |
35 | 35 | ||
36 | public CouponEventModel() { | 36 | public CouponEventModel() { |
37 | - this.success = false; | 37 | + this.success = true; |
38 | } | 38 | } |
39 | 39 | ||
40 | public boolean isSuccess() { | 40 | public boolean isSuccess() { | ... | ... |
1 | +/* | ||
2 | + * Copyright 2010-2013 Warply Ltd. All rights reserved. | ||
3 | + * | ||
4 | + * Redistribution and use in source and binary forms, without modification, are | ||
5 | + * permitted provided that the following conditions are met: | ||
6 | + * | ||
7 | + * 1. Redistributions of source code must retain the above copyright notice, | ||
8 | + * this list of conditions and the following disclaimer. | ||
9 | + * | ||
10 | + * 2. Redistributions in binary form must reproduce the above copyright notice, | ||
11 | + * this list of conditions and the following disclaimer in the documentation | ||
12 | + * and/or other materials provided with the distribution. | ||
13 | + * | ||
14 | + * THIS SOFTWARE IS PROVIDED BY THE WARPLY LTD ``AS IS'' AND ANY EXPRESS OR | ||
15 | + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF | ||
16 | + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO | ||
17 | + * EVENT SHALL WARPLY LTD OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, | ||
18 | + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||
19 | + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, | ||
20 | + * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF | ||
21 | + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING | ||
22 | + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, | ||
23 | + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
24 | + */ | ||
25 | + | ||
26 | +package ly.warp.sdk.io.models; | ||
27 | + | ||
28 | + | ||
29 | +/** | ||
30 | + * Created by Panagiotis Triantafyllou on 27-June-22. | ||
31 | + */ | ||
32 | + | ||
33 | +public class LoyaltyBadgeModel { | ||
34 | + private float value; | ||
35 | + private int couponCount; | ||
36 | + | ||
37 | + public LoyaltyBadgeModel() { | ||
38 | + this.value = 0.0f; | ||
39 | + this.couponCount = 0; | ||
40 | + } | ||
41 | + | ||
42 | + public float getValue() { | ||
43 | + return value; | ||
44 | + } | ||
45 | + | ||
46 | + public void setValue(float value) { | ||
47 | + this.value = value; | ||
48 | + } | ||
49 | + | ||
50 | + public int getCouponCount() { | ||
51 | + return couponCount; | ||
52 | + } | ||
53 | + | ||
54 | + public void setCouponCount(int couponCount) { | ||
55 | + this.couponCount = couponCount; | ||
56 | + } | ||
57 | +} |
... | @@ -127,7 +127,7 @@ public class PacingDetails { | ... | @@ -127,7 +127,7 @@ public class PacingDetails { |
127 | return humanReadableString; | 127 | return humanReadableString; |
128 | } | 128 | } |
129 | 129 | ||
130 | - private class PacingInner { | 130 | + public class PacingInner { |
131 | private static final String TOTAL = "total"; | 131 | private static final String TOTAL = "total"; |
132 | private static final String MONTH = "month"; | 132 | private static final String MONTH = "month"; |
133 | private static final String WEEK = "week"; | 133 | private static final String WEEK = "week"; |
... | @@ -195,7 +195,7 @@ public class PacingDetails { | ... | @@ -195,7 +195,7 @@ public class PacingDetails { |
195 | } | 195 | } |
196 | } | 196 | } |
197 | 197 | ||
198 | - private class PacingDetailsInner { | 198 | + public class PacingDetailsInner { |
199 | private static final String GOAL = "goal"; | 199 | private static final String GOAL = "goal"; |
200 | private static final String VALLUE = "value"; | 200 | private static final String VALLUE = "value"; |
201 | private static final String PER_DAY = "per_day"; | 201 | private static final String PER_DAY = "per_day"; |
... | @@ -256,7 +256,7 @@ public class PacingDetails { | ... | @@ -256,7 +256,7 @@ public class PacingDetails { |
256 | } | 256 | } |
257 | } | 257 | } |
258 | 258 | ||
259 | - private class PacingDetailsDay { | 259 | + public class PacingDetailsDay { |
260 | private static final String DAY = "day"; | 260 | private static final String DAY = "day"; |
261 | private static final String VALLUE = "value"; | 261 | private static final String VALLUE = "value"; |
262 | 262 | ... | ... |
... | @@ -44,9 +44,11 @@ import ly.warp.sdk.io.models.ActiveDFYCouponModel; | ... | @@ -44,9 +44,11 @@ import ly.warp.sdk.io.models.ActiveDFYCouponModel; |
44 | import ly.warp.sdk.io.models.Campaign; | 44 | import ly.warp.sdk.io.models.Campaign; |
45 | import ly.warp.sdk.io.models.CampaignList; | 45 | import ly.warp.sdk.io.models.CampaignList; |
46 | import ly.warp.sdk.io.models.Consumer; | 46 | import ly.warp.sdk.io.models.Consumer; |
47 | +import ly.warp.sdk.io.models.Coupon; | ||
47 | import ly.warp.sdk.io.models.CouponList; | 48 | import ly.warp.sdk.io.models.CouponList; |
48 | import ly.warp.sdk.io.models.CouponsetsList; | 49 | import ly.warp.sdk.io.models.CouponsetsList; |
49 | import ly.warp.sdk.io.models.CustomerStateModel; | 50 | import ly.warp.sdk.io.models.CustomerStateModel; |
51 | +import ly.warp.sdk.io.models.LoyaltyBadgeModel; | ||
50 | import ly.warp.sdk.io.models.LoyaltyContextualOfferModel; | 52 | import ly.warp.sdk.io.models.LoyaltyContextualOfferModel; |
51 | import ly.warp.sdk.io.models.LoyaltyGiftsForYouPackage; | 53 | import ly.warp.sdk.io.models.LoyaltyGiftsForYouPackage; |
52 | import ly.warp.sdk.io.request.CosmoteRetrieveSharingRequest; | 54 | import ly.warp.sdk.io.request.CosmoteRetrieveSharingRequest; |
... | @@ -78,6 +80,7 @@ public class WarplyManagerHelper { | ... | @@ -78,6 +80,7 @@ public class WarplyManagerHelper { |
78 | private static ArrayList<LoyaltyContextualOfferModel> mCCMSList = new ArrayList<>(); | 80 | private static ArrayList<LoyaltyContextualOfferModel> mCCMSList = new ArrayList<>(); |
79 | private static AlertDialog mAlertDialogSharing, mAlertDialogAcceptSharing, mAlertDialogRejectSharing, | 81 | private static AlertDialog mAlertDialogSharing, mAlertDialogAcceptSharing, mAlertDialogRejectSharing, |
80 | mAlertDialogReturnSharing, mAlertDialogErrorSharing; | 82 | mAlertDialogReturnSharing, mAlertDialogErrorSharing; |
83 | + private static LoyaltyBadgeModel mLoyaltyBadge = new LoyaltyBadgeModel(); | ||
81 | 84 | ||
82 | // =========================================================== | 85 | // =========================================================== |
83 | // Methods for/from SuperClass/Interfaces | 86 | // Methods for/from SuperClass/Interfaces |
... | @@ -117,7 +120,6 @@ public class WarplyManagerHelper { | ... | @@ -117,7 +120,6 @@ public class WarplyManagerHelper { |
117 | WarplyManager.cosmoteSharing(new CosmoteSharingRequest().setSharingId(sharingId), new CallbackReceiver<JSONObject>() { | 120 | WarplyManager.cosmoteSharing(new CosmoteSharingRequest().setSharingId(sharingId), new CallbackReceiver<JSONObject>() { |
118 | @Override | 121 | @Override |
119 | public void onSuccess(JSONObject result) { | 122 | public void onSuccess(JSONObject result) { |
120 | - Log.v("CosmoteSharing", "Success"); | ||
121 | int status = result.optInt("status", 2); | 123 | int status = result.optInt("status", 2); |
122 | if (status == 1) { | 124 | if (status == 1) { |
123 | JSONObject innerResult = new JSONObject(); | 125 | JSONObject innerResult = new JSONObject(); |
... | @@ -140,7 +142,6 @@ public class WarplyManagerHelper { | ... | @@ -140,7 +142,6 @@ public class WarplyManagerHelper { |
140 | 142 | ||
141 | @Override | 143 | @Override |
142 | public void onFailure(int errorCode) { | 144 | public void onFailure(int errorCode) { |
143 | - Log.v("CosmoteSharing", "Error"); | ||
144 | errorSharingDialog(context); | 145 | errorSharingDialog(context); |
145 | } | 146 | } |
146 | }); | 147 | }); |
... | @@ -353,6 +354,17 @@ public class WarplyManagerHelper { | ... | @@ -353,6 +354,17 @@ public class WarplyManagerHelper { |
353 | } | 354 | } |
354 | 355 | ||
355 | /** | 356 | /** |
357 | + * Open Pacing | ||
358 | + */ | ||
359 | + public static String openPacing() { | ||
360 | + if (mUniqueCampaignList != null && mUniqueCampaignList.get("pacing") != null && mUniqueCampaignList.get("pacing").size() > 0) { | ||
361 | + return constructCampaignUrl(mUniqueCampaignList.get("pacing").get(0)); | ||
362 | + } | ||
363 | + | ||
364 | + return ""; | ||
365 | + } | ||
366 | + | ||
367 | + /** | ||
356 | * Save if customer is nonTelco and if he/she has accepted the consents, | 368 | * Save if customer is nonTelco and if he/she has accepted the consents, |
357 | * And his msisdn list | 369 | * And his msisdn list |
358 | */ | 370 | */ |
... | @@ -437,9 +449,32 @@ public class WarplyManagerHelper { | ... | @@ -437,9 +449,32 @@ public class WarplyManagerHelper { |
437 | } | 449 | } |
438 | 450 | ||
439 | public static void setCouponList(CouponList couponList) { | 451 | public static void setCouponList(CouponList couponList) { |
452 | + LoyaltyBadgeModel badge = new LoyaltyBadgeModel(); | ||
453 | + CouponList cpnlist = new CouponList(); | ||
454 | + float couponValue = 0.0f; | ||
455 | + int couponCount = 0; | ||
456 | + for (Coupon coupon : couponList) { | ||
457 | + if (coupon.getStatus() == 1) { | ||
458 | + try { | ||
459 | + cpnlist.add(coupon); | ||
460 | + couponCount += 1; | ||
461 | + couponValue += Float.parseFloat(coupon.getDiscount()); | ||
462 | + } catch (NumberFormatException e) { | ||
463 | + cpnlist.remove(coupon); | ||
464 | + couponCount -= 1; | ||
465 | + } | ||
466 | + } | ||
467 | + } | ||
468 | + badge.setCouponCount(couponCount); | ||
469 | + badge.setValue(couponValue); | ||
470 | + mLoyaltyBadge = badge; | ||
440 | mCouponList = couponList; | 471 | mCouponList = couponList; |
441 | } | 472 | } |
442 | 473 | ||
474 | + public static LoyaltyBadgeModel getLoyaltyBadge() { | ||
475 | + return mLoyaltyBadge; | ||
476 | + } | ||
477 | + | ||
443 | public static CouponsetsList getCouponsets() { | 478 | public static CouponsetsList getCouponsets() { |
444 | return mCouponsetsList; | 479 | return mCouponsetsList; |
445 | } | 480 | } | ... | ... |
... | @@ -64,6 +64,8 @@ import java.util.Map; | ... | @@ -64,6 +64,8 @@ import java.util.Map; |
64 | import ly.warp.sdk.Warply; | 64 | import ly.warp.sdk.Warply; |
65 | import ly.warp.sdk.io.models.CouponEventModel; | 65 | import ly.warp.sdk.io.models.CouponEventModel; |
66 | import ly.warp.sdk.io.models.QuestionnaireEventModel; | 66 | import ly.warp.sdk.io.models.QuestionnaireEventModel; |
67 | +import ly.warp.sdk.io.models.WarplyPacingCardEventModel; | ||
68 | +import ly.warp.sdk.io.models.WarplyPacingCardServiceEnabledModel; | ||
67 | import ly.warp.sdk.utils.WarpUtils; | 69 | import ly.warp.sdk.utils.WarpUtils; |
68 | import ly.warp.sdk.utils.WarplyProperty; | 70 | import ly.warp.sdk.utils.WarplyProperty; |
69 | import ly.warp.sdk.utils.WarplyUrlHandler; | 71 | import ly.warp.sdk.utils.WarplyUrlHandler; |
... | @@ -384,9 +386,25 @@ public class WarpView extends WebView { | ... | @@ -384,9 +386,25 @@ public class WarpView extends WebView { |
384 | WarpUtils.setUserTag(Warply.getWarplyContext(), parts[2]); | 386 | WarpUtils.setUserTag(Warply.getWarplyContext(), parts[2]); |
385 | EventBus.getDefault().post(new WarplyEventBusManager(questionnaireEvent)); | 387 | EventBus.getDefault().post(new WarplyEventBusManager(questionnaireEvent)); |
386 | } else if (parts[1].equals("event:couponRetrieved")) { | 388 | } else if (parts[1].equals("event:couponRetrieved")) { |
387 | - CouponEventModel couponEvent = new CouponEventModel(); | 389 | + EventBus.getDefault().post(new WarplyEventBusManager(new CouponEventModel())); |
388 | - couponEvent.setSuccess(true); | 390 | + } else if (parts[2].equals("serviceDisabled")) { |
389 | - EventBus.getDefault().post(new WarplyEventBusManager(couponEvent)); | 391 | + WarplyPacingCardServiceEnabledModel pacingService = new WarplyPacingCardServiceEnabledModel(); |
392 | + pacingService.setEnabled(false); | ||
393 | + EventBus.getDefault().post(new WarplyEventBusManager(pacingService)); | ||
394 | + } else if (parts[2].equals("serviceEnabled")) { | ||
395 | + WarplyPacingCardServiceEnabledModel pacingService = new WarplyPacingCardServiceEnabledModel(); | ||
396 | + pacingService.setEnabled(true); | ||
397 | + EventBus.getDefault().post(new WarplyEventBusManager(pacingService)); | ||
398 | + } else if (parts[2].equals("shortcutEnabled")) { | ||
399 | + WarplyPacingCardEventModel pacingVisible = new WarplyPacingCardEventModel(); | ||
400 | + pacingVisible.setVisible(true); | ||
401 | + EventBus.getDefault().post(new WarplyEventBusManager(pacingVisible)); | ||
402 | + } else if (parts[2].equals("shortcutDisabled")) { | ||
403 | + WarplyPacingCardEventModel pacingVisible = new WarplyPacingCardEventModel(); | ||
404 | + pacingVisible.setVisible(false); | ||
405 | + EventBus.getDefault().post(new WarplyEventBusManager(pacingVisible)); | ||
406 | + } else if (parts[1].equals("request") || parts[1].equals("response")) { | ||
407 | + WarpUtils.verbose(parts[2]); | ||
390 | } | 408 | } |
391 | } | 409 | } |
392 | } | 410 | } | ... | ... |
... | @@ -36,13 +36,14 @@ public class MergedGiftsAdapter extends RecyclerView.Adapter<MergedGiftsAdapter. | ... | @@ -36,13 +36,14 @@ public class MergedGiftsAdapter extends RecyclerView.Adapter<MergedGiftsAdapter. |
36 | } | 36 | } |
37 | 37 | ||
38 | public class MergedGiftsViewHolder extends RecyclerView.ViewHolder { | 38 | public class MergedGiftsViewHolder extends RecyclerView.ViewHolder { |
39 | - private ImageView ivMergedGiftsLogo; | 39 | + private ImageView ivMergedGiftsLogo, ivIsNew; |
40 | private TextView tvMergedGiftsTitle; | 40 | private TextView tvMergedGiftsTitle; |
41 | 41 | ||
42 | public MergedGiftsViewHolder(View view) { | 42 | public MergedGiftsViewHolder(View view) { |
43 | super(view); | 43 | super(view); |
44 | ivMergedGiftsLogo = view.findViewById(R.id.iv_campaign_logo); | 44 | ivMergedGiftsLogo = view.findViewById(R.id.iv_campaign_logo); |
45 | tvMergedGiftsTitle = view.findViewById(R.id.tv_campaign_title); | 45 | tvMergedGiftsTitle = view.findViewById(R.id.tv_campaign_title); |
46 | + ivIsNew = view.findViewById(R.id.iv_campaign_new); | ||
46 | } | 47 | } |
47 | } | 48 | } |
48 | 49 | ||
... | @@ -90,6 +91,11 @@ public class MergedGiftsAdapter extends RecyclerView.Adapter<MergedGiftsAdapter. | ... | @@ -90,6 +91,11 @@ public class MergedGiftsAdapter extends RecyclerView.Adapter<MergedGiftsAdapter. |
90 | } | 91 | } |
91 | 92 | ||
92 | holder.tvMergedGiftsTitle.setText(mergedgiftsItem.getCampaign().getTitle()); | 93 | holder.tvMergedGiftsTitle.setText(mergedgiftsItem.getCampaign().getTitle()); |
94 | + | ||
95 | + if (mergedgiftsItem.getCampaign().getIsNew()) | ||
96 | + holder.ivIsNew.setVisibility(View.VISIBLE); | ||
97 | + else | ||
98 | + holder.ivIsNew.setVisibility(View.GONE); | ||
93 | } else if (mergedgiftsItem != null && mergedgiftsItem.getDataType() == 2) { | 99 | } else if (mergedgiftsItem != null && mergedgiftsItem.getDataType() == 2) { |
94 | if (!TextUtils.isEmpty(mergedgiftsItem.getSeasonalList().getImageUrl())) { | 100 | if (!TextUtils.isEmpty(mergedgiftsItem.getSeasonalList().getImageUrl())) { |
95 | Glide.with(mContext) | 101 | Glide.with(mContext) | ... | ... |
... | @@ -42,8 +42,8 @@ public class ProfileCampaignAdapter extends RecyclerView.Adapter<ProfileCampaign | ... | @@ -42,8 +42,8 @@ public class ProfileCampaignAdapter extends RecyclerView.Adapter<ProfileCampaign |
42 | } | 42 | } |
43 | 43 | ||
44 | public class ProfileCampaignViewHolder extends RecyclerView.ViewHolder { | 44 | public class ProfileCampaignViewHolder extends RecyclerView.ViewHolder { |
45 | - private ImageView ivCampaignTitle; | 45 | + private ImageView ivCampaignTitle, ivIsNew; |
46 | - private TextView tvCampaignTitle, tvCampaignSubtitle; | 46 | + private TextView tvCampaignTitle, tvCampaignSubtitle, tvCampaignMessage; |
47 | 47 | ||
48 | public ProfileCampaignViewHolder(View view) { | 48 | public ProfileCampaignViewHolder(View view) { |
49 | super(view); | 49 | super(view); |
... | @@ -55,8 +55,11 @@ public class ProfileCampaignAdapter extends RecyclerView.Adapter<ProfileCampaign | ... | @@ -55,8 +55,11 @@ public class ProfileCampaignAdapter extends RecyclerView.Adapter<ProfileCampaign |
55 | super(view); | 55 | super(view); |
56 | ivCampaignTitle = view.findViewById(R.id.iv_campaign_logo); | 56 | ivCampaignTitle = view.findViewById(R.id.iv_campaign_logo); |
57 | tvCampaignTitle = view.findViewById(R.id.tv_campaign_title); | 57 | tvCampaignTitle = view.findViewById(R.id.tv_campaign_title); |
58 | - if (vertical) | 58 | + ivIsNew = view.findViewById(R.id.iv_campaign_new); |
59 | + if (vertical) { | ||
59 | tvCampaignSubtitle = view.findViewById(R.id.tv_campaign_subtitle); | 60 | tvCampaignSubtitle = view.findViewById(R.id.tv_campaign_subtitle); |
61 | + tvCampaignMessage = view.findViewById(R.id.tv_campaign_message); | ||
62 | + } | ||
60 | } | 63 | } |
61 | } | 64 | } |
62 | 65 | ||
... | @@ -109,8 +112,14 @@ public class ProfileCampaignAdapter extends RecyclerView.Adapter<ProfileCampaign | ... | @@ -109,8 +112,14 @@ public class ProfileCampaignAdapter extends RecyclerView.Adapter<ProfileCampaign |
109 | } | 112 | } |
110 | 113 | ||
111 | holder.tvCampaignTitle.setText(campaignItem.getTitle()); | 114 | holder.tvCampaignTitle.setText(campaignItem.getTitle()); |
112 | - if (mIsVertical) | 115 | + if (mIsVertical) { |
113 | holder.tvCampaignSubtitle.setText(campaignItem.getSubtitle()); | 116 | holder.tvCampaignSubtitle.setText(campaignItem.getSubtitle()); |
117 | + holder.tvCampaignMessage.setText(campaignItem.getMessage()); | ||
118 | + if (campaignItem.getIsNew()) | ||
119 | + holder.ivIsNew.setVisibility(View.VISIBLE); | ||
120 | + else | ||
121 | + holder.ivIsNew.setVisibility(View.GONE); | ||
122 | + } | ||
114 | 123 | ||
115 | holder.itemView.setOnClickListener(v -> onClickSubject.onNext(campaignItem)); | 124 | holder.itemView.setOnClickListener(v -> onClickSubject.onNext(campaignItem)); |
116 | } | 125 | } | ... | ... |
4.32 KB
1.9 KB
2.26 KB
791 Bytes
... | @@ -6,5 +6,5 @@ | ... | @@ -6,5 +6,5 @@ |
6 | android:endColor="@color/cos_green8" | 6 | android:endColor="@color/cos_green8" |
7 | android:type="linear"/> | 7 | android:type="linear"/> |
8 | <corners | 8 | <corners |
9 | - android:radius="8dp"/> | 9 | + android:radius="5dp"/> |
10 | </shape> | 10 | </shape> |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
1 | +<?xml version="1.0" encoding="utf-8"?> | ||
2 | +<shape xmlns:android="http://schemas.android.com/apk/res/android" | ||
3 | + android:shape="rectangle"> | ||
4 | + <corners android:radius="8dp" /> | ||
5 | + | ||
6 | + <solid android:color="@color/cos_grey2" /> | ||
7 | +</shape> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | <?xml version="1.0" encoding="utf-8"?> | 1 | <?xml version="1.0" encoding="utf-8"?> |
2 | <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | 2 | <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" |
3 | xmlns:app="http://schemas.android.com/apk/res-auto" | 3 | xmlns:app="http://schemas.android.com/apk/res-auto" |
4 | + xmlns:tools="http://schemas.android.com/tools" | ||
4 | android:id="@+id/cl_bill_payment" | 5 | android:id="@+id/cl_bill_payment" |
5 | android:layout_width="match_parent" | 6 | android:layout_width="match_parent" |
6 | android:layout_height="match_parent" | 7 | android:layout_height="match_parent" |
... | @@ -52,7 +53,8 @@ | ... | @@ -52,7 +53,8 @@ |
52 | android:background="@drawable/shape_cos_gradient5" | 53 | android:background="@drawable/shape_cos_gradient5" |
53 | android:orientation="vertical" | 54 | android:orientation="vertical" |
54 | android:paddingVertical="16dp" | 55 | android:paddingVertical="16dp" |
55 | - android:visibility="gone"> | 56 | + android:visibility="gone" |
57 | + tools:visibility="visible"> | ||
56 | 58 | ||
57 | <ImageView | 59 | <ImageView |
58 | android:id="@+id/iv_popup_gifts_close" | 60 | android:id="@+id/iv_popup_gifts_close" |
... | @@ -62,11 +64,11 @@ | ... | @@ -62,11 +64,11 @@ |
62 | android:src="@drawable/ic_close_white" /> | 64 | android:src="@drawable/ic_close_white" /> |
63 | 65 | ||
64 | <ImageView | 66 | <ImageView |
65 | - android:layout_width="wrap_content" | 67 | + android:layout_width="48dp" |
66 | - android:layout_height="wrap_content" | 68 | + android:layout_height="48dp" |
67 | android:layout_gravity="center" | 69 | android:layout_gravity="center" |
68 | android:scaleType="centerInside" | 70 | android:scaleType="centerInside" |
69 | - android:src="@drawable/ic_gifts_for_you_white" /> | 71 | + android:src="@drawable/ic_present" /> |
70 | 72 | ||
71 | <TextView | 73 | <TextView |
72 | android:layout_width="wrap_content" | 74 | android:layout_width="wrap_content" |
... | @@ -84,6 +86,7 @@ | ... | @@ -84,6 +86,7 @@ |
84 | android:layout_height="wrap_content" | 86 | android:layout_height="wrap_content" |
85 | android:layout_gravity="center" | 87 | android:layout_gravity="center" |
86 | android:gravity="center" | 88 | android:gravity="center" |
89 | + android:layout_marginHorizontal="40dp" | ||
87 | android:text="@string/cos_popup_gifts_subtitle" | 90 | android:text="@string/cos_popup_gifts_subtitle" |
88 | android:textColor="@android:color/white" | 91 | android:textColor="@android:color/white" |
89 | android:textSize="16sp" /> | 92 | android:textSize="16sp" /> | ... | ... |
... | @@ -122,7 +122,7 @@ | ... | @@ -122,7 +122,7 @@ |
122 | android:paddingHorizontal="10dp" | 122 | android:paddingHorizontal="10dp" |
123 | android:paddingVertical="3dp" | 123 | android:paddingVertical="3dp" |
124 | android:visibility="gone" | 124 | android:visibility="gone" |
125 | - tools:visibility="visible"> | 125 | + tools:visibility="gone"> |
126 | 126 | ||
127 | <TextView | 127 | <TextView |
128 | android:id="@+id/tv_type" | 128 | android:id="@+id/tv_type" |
... | @@ -138,16 +138,18 @@ | ... | @@ -138,16 +138,18 @@ |
138 | android:layout_width="wrap_content" | 138 | android:layout_width="wrap_content" |
139 | android:layout_height="wrap_content" | 139 | android:layout_height="wrap_content" |
140 | android:gravity="center" | 140 | android:gravity="center" |
141 | + android:background="@drawable/shape_cos_grey5" | ||
141 | android:paddingHorizontal="8dp" | 142 | android:paddingHorizontal="8dp" |
142 | android:paddingVertical="4dp" | 143 | android:paddingVertical="4dp" |
143 | - android:visibility="gone"> | 144 | + android:visibility="gone" |
145 | + tools:visibility="visible"> | ||
144 | 146 | ||
145 | <TextView | 147 | <TextView |
146 | android:id="@+id/tv_questionnaire" | 148 | android:id="@+id/tv_questionnaire" |
147 | android:layout_width="wrap_content" | 149 | android:layout_width="wrap_content" |
148 | android:layout_height="wrap_content" | 150 | android:layout_height="wrap_content" |
149 | - android:text="@string/cos_profile_questionnaire" | 151 | + android:text="@string/cos_profile_preferences" |
150 | - android:textColor="@color/cos_dark_blue" | 152 | + android:textColor="@color/cos_green6" |
151 | android:textFontWeight="600" /> | 153 | android:textFontWeight="600" /> |
152 | </LinearLayout> | 154 | </LinearLayout> |
153 | </LinearLayout> | 155 | </LinearLayout> |
... | @@ -315,6 +317,7 @@ | ... | @@ -315,6 +317,7 @@ |
315 | </androidx.constraintlayout.widget.ConstraintLayout> | 317 | </androidx.constraintlayout.widget.ConstraintLayout> |
316 | 318 | ||
317 | <ImageView | 319 | <ImageView |
320 | + android:id="@+id/dfy_logo" | ||
318 | android:layout_width="110dp" | 321 | android:layout_width="110dp" |
319 | android:layout_height="40dp" | 322 | android:layout_height="40dp" |
320 | android:layout_gravity="start" | 323 | android:layout_gravity="start" | ... | ... |
... | @@ -3,6 +3,7 @@ | ... | @@ -3,6 +3,7 @@ |
3 | xmlns:app="http://schemas.android.com/apk/res-auto" | 3 | xmlns:app="http://schemas.android.com/apk/res-auto" |
4 | android:layout_width="match_parent" | 4 | android:layout_width="match_parent" |
5 | android:layout_height="match_parent" | 5 | android:layout_height="match_parent" |
6 | + xmlns:tools="http://schemas.android.com/tools" | ||
6 | android:background="@android:color/white" | 7 | android:background="@android:color/white" |
7 | android:fillViewport="true"> | 8 | android:fillViewport="true"> |
8 | 9 | ||
... | @@ -52,7 +53,8 @@ | ... | @@ -52,7 +53,8 @@ |
52 | android:background="@drawable/shape_cos_gradient5" | 53 | android:background="@drawable/shape_cos_gradient5" |
53 | android:orientation="vertical" | 54 | android:orientation="vertical" |
54 | android:paddingVertical="16dp" | 55 | android:paddingVertical="16dp" |
55 | - android:visibility="gone"> | 56 | + android:visibility="gone" |
57 | + tools:visibility="visible"> | ||
56 | 58 | ||
57 | <ImageView | 59 | <ImageView |
58 | android:id="@+id/iv_popup_more_close" | 60 | android:id="@+id/iv_popup_more_close" |
... | @@ -62,17 +64,17 @@ | ... | @@ -62,17 +64,17 @@ |
62 | android:src="@drawable/ic_close_white" /> | 64 | android:src="@drawable/ic_close_white" /> |
63 | 65 | ||
64 | <ImageView | 66 | <ImageView |
65 | - android:layout_width="wrap_content" | 67 | + android:layout_width="48dp" |
66 | android:layout_height="wrap_content" | 68 | android:layout_height="wrap_content" |
67 | android:layout_gravity="center" | 69 | android:layout_gravity="center" |
68 | android:scaleType="centerInside" | 70 | android:scaleType="centerInside" |
69 | - android:src="@drawable/ic_more_for_you_new" /> | 71 | + android:src="@drawable/ic_heart" /> |
70 | 72 | ||
71 | <TextView | 73 | <TextView |
72 | android:layout_width="wrap_content" | 74 | android:layout_width="wrap_content" |
73 | android:layout_height="wrap_content" | 75 | android:layout_height="wrap_content" |
74 | android:layout_gravity="center" | 76 | android:layout_gravity="center" |
75 | - android:layout_marginTop="24dp" | 77 | + android:layout_marginTop="8dp" |
76 | android:layout_marginBottom="12dp" | 78 | android:layout_marginBottom="12dp" |
77 | android:text="@string/cos_popup_more_title" | 79 | android:text="@string/cos_popup_more_title" |
78 | android:textColor="@android:color/white" | 80 | android:textColor="@android:color/white" |
... | @@ -84,6 +86,7 @@ | ... | @@ -84,6 +86,7 @@ |
84 | android:layout_height="wrap_content" | 86 | android:layout_height="wrap_content" |
85 | android:layout_gravity="center" | 87 | android:layout_gravity="center" |
86 | android:gravity="center" | 88 | android:gravity="center" |
89 | + android:layout_marginHorizontal="40dp" | ||
87 | android:text="@string/cos_popup_more_subtitle" | 90 | android:text="@string/cos_popup_more_subtitle" |
88 | android:textColor="@android:color/white" | 91 | android:textColor="@android:color/white" |
89 | android:textSize="16sp" /> | 92 | android:textSize="16sp" /> |
... | @@ -94,7 +97,6 @@ | ... | @@ -94,7 +97,6 @@ |
94 | android:layout_width="match_parent" | 97 | android:layout_width="match_parent" |
95 | android:layout_height="match_parent" | 98 | android:layout_height="match_parent" |
96 | android:layout_below="@+id/ll_more_popup" | 99 | android:layout_below="@+id/ll_more_popup" |
97 | - android:layout_marginHorizontal="16dp" | ||
98 | android:layout_marginTop="4dp" | 100 | android:layout_marginTop="4dp" |
99 | android:clipToPadding="false" | 101 | android:clipToPadding="false" |
100 | android:orientation="vertical" | 102 | android:orientation="vertical" | ... | ... |
1 | <?xml version="1.0" encoding="utf-8"?> | 1 | <?xml version="1.0" encoding="utf-8"?> |
2 | -<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android" | 2 | +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" |
3 | xmlns:app="http://schemas.android.com/apk/res-auto" | 3 | xmlns:app="http://schemas.android.com/apk/res-auto" |
4 | xmlns:tools="http://schemas.android.com/tools" | 4 | xmlns:tools="http://schemas.android.com/tools" |
5 | android:layout_width="match_parent" | 5 | android:layout_width="match_parent" |
6 | android:layout_height="150dp" | 6 | android:layout_height="150dp" |
7 | - android:layout_marginHorizontal="16dp" | 7 | + android:layout_marginBottom="24dp"> |
8 | - android:layout_marginBottom="24dp" | ||
9 | - app:cardCornerRadius="4dp"> | ||
10 | 8 | ||
11 | - <androidx.constraintlayout.widget.ConstraintLayout | 9 | + <androidx.cardview.widget.CardView |
12 | android:layout_width="match_parent" | 10 | android:layout_width="match_parent" |
13 | android:layout_height="match_parent" | 11 | android:layout_height="match_parent" |
14 | - android:background="@drawable/selector_cos_campaign"> | ||
15 | 12 | ||
16 | - <androidx.constraintlayout.widget.Guideline | 13 | + android:layout_marginHorizontal="16dp" |
17 | - android:id="@+id/gl_vertical_60_percent" | 14 | + app:cardCornerRadius="4dp"> |
18 | - android:layout_width="wrap_content" | ||
19 | - android:layout_height="wrap_content" | ||
20 | - android:orientation="vertical" | ||
21 | - app:layout_constraintGuide_percent="0.6" /> | ||
22 | 15 | ||
23 | - <ImageView | 16 | + <androidx.constraintlayout.widget.ConstraintLayout |
24 | - android:id="@+id/iv_campaign_logo" | 17 | + android:layout_width="match_parent" |
25 | - android:layout_width="0dp" | 18 | + android:layout_height="match_parent" |
26 | - android:layout_height="0dp" | 19 | + android:background="@drawable/selector_cos_campaign"> |
27 | - android:scaleType="centerCrop" | ||
28 | - app:layout_constraintBottom_toBottomOf="parent" | ||
29 | - app:layout_constraintHorizontal_bias="0.0" | ||
30 | - app:layout_constraintLeft_toLeftOf="parent" | ||
31 | - app:layout_constraintRight_toLeftOf="@+id/gl_vertical_60_percent" | ||
32 | - app:layout_constraintTop_toTopOf="parent" | ||
33 | - app:layout_constraintVertical_bias="0.0" | ||
34 | - tools:src="@drawable/ic_cosmote_logo_horizontal_grey" /> | ||
35 | 20 | ||
36 | - <TextView | 21 | + <androidx.constraintlayout.widget.Guideline |
37 | - android:id="@+id/tv_campaign_title" | 22 | + android:id="@+id/gl_vertical_60_percent" |
38 | - android:layout_width="0dp" | 23 | + android:layout_width="wrap_content" |
39 | - android:layout_height="wrap_content" | 24 | + android:layout_height="wrap_content" |
40 | - android:layout_marginHorizontal="12dp" | 25 | + android:orientation="vertical" |
41 | - android:gravity="center" | 26 | + app:layout_constraintGuide_percent="0.6" /> |
42 | - android:maxLines="4" | ||
43 | - android:textColor="@color/grey" | ||
44 | - app:layout_constraintBottom_toBottomOf="parent" | ||
45 | - app:layout_constraintLeft_toRightOf="@+id/gl_vertical_60_percent" | ||
46 | - app:layout_constraintRight_toRightOf="parent" | ||
47 | - app:layout_constraintTop_toTopOf="parent" | ||
48 | - tools:text="-10% in all products from IKEA" /> | ||
49 | 27 | ||
50 | - </androidx.constraintlayout.widget.ConstraintLayout> | ||
51 | -</androidx.cardview.widget.CardView> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
28 | + <ImageView | ||
29 | + android:id="@+id/iv_campaign_logo" | ||
30 | + android:layout_width="0dp" | ||
31 | + android:layout_height="0dp" | ||
32 | + android:scaleType="centerCrop" | ||
33 | + app:layout_constraintBottom_toBottomOf="parent" | ||
34 | + app:layout_constraintHorizontal_bias="0.0" | ||
35 | + app:layout_constraintLeft_toLeftOf="parent" | ||
36 | + app:layout_constraintRight_toLeftOf="@+id/gl_vertical_60_percent" | ||
37 | + app:layout_constraintTop_toTopOf="parent" | ||
38 | + app:layout_constraintVertical_bias="0.0" | ||
39 | + tools:src="@drawable/ic_cosmote_logo_horizontal_grey" /> | ||
40 | + | ||
41 | + <TextView | ||
42 | + android:id="@+id/tv_campaign_title" | ||
43 | + android:layout_width="0dp" | ||
44 | + android:layout_height="wrap_content" | ||
45 | + android:layout_marginHorizontal="12dp" | ||
46 | + android:gravity="center" | ||
47 | + android:maxLines="4" | ||
48 | + android:textColor="@color/grey" | ||
49 | + app:layout_constraintBottom_toBottomOf="parent" | ||
50 | + app:layout_constraintLeft_toRightOf="@+id/gl_vertical_60_percent" | ||
51 | + app:layout_constraintRight_toRightOf="parent" | ||
52 | + app:layout_constraintTop_toTopOf="parent" | ||
53 | + tools:text="-10% in all products from IKEA" /> | ||
54 | + </androidx.constraintlayout.widget.ConstraintLayout> | ||
55 | + </androidx.cardview.widget.CardView> | ||
56 | + | ||
57 | + <ImageView | ||
58 | + android:id="@+id/iv_campaign_new" | ||
59 | + android:layout_width="56dp" | ||
60 | + android:layout_height="24dp" | ||
61 | + android:layout_alignParentEnd="true" | ||
62 | + android:layout_marginTop="8dp" | ||
63 | + android:layout_marginEnd="10dp" | ||
64 | + android:scaleType="centerCrop" | ||
65 | + android:src="@drawable/ic_new_icon" | ||
66 | + android:translationZ="2dp" | ||
67 | + android:visibility="gone" | ||
68 | + app:layout_constraintEnd_toEndOf="parent" | ||
69 | + app:layout_constraintTop_toTopOf="parent" | ||
70 | + tools:visibility="visible" /> | ||
71 | +</RelativeLayout> | ||
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
1 | <?xml version="1.0" encoding="utf-8"?> | 1 | <?xml version="1.0" encoding="utf-8"?> |
2 | -<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android" | 2 | +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" |
3 | xmlns:app="http://schemas.android.com/apk/res-auto" | 3 | xmlns:app="http://schemas.android.com/apk/res-auto" |
4 | xmlns:tools="http://schemas.android.com/tools" | 4 | xmlns:tools="http://schemas.android.com/tools" |
5 | android:layout_width="match_parent" | 5 | android:layout_width="match_parent" |
6 | android:layout_height="240dp" | 6 | android:layout_height="240dp" |
7 | android:layout_marginBottom="16dp" | 7 | android:layout_marginBottom="16dp" |
8 | - app:cardCornerRadius="5dp"> | 8 | + android:background="@android:color/transparent"> |
9 | 9 | ||
10 | - <androidx.constraintlayout.widget.ConstraintLayout | 10 | + <androidx.cardview.widget.CardView |
11 | android:layout_width="match_parent" | 11 | android:layout_width="match_parent" |
12 | - android:layout_height="match_parent" | 12 | + android:layout_height="240dp" |
13 | - android:background="@drawable/selector_cos_campaign"> | 13 | + android:layout_marginHorizontal="16dp" |
14 | - | 14 | + android:background="@android:color/transparent" |
15 | - <androidx.constraintlayout.widget.Guideline | 15 | + app:cardCornerRadius="5dp"> |
16 | - android:id="@+id/gl_vertical_80_percent" | ||
17 | - android:layout_width="wrap_content" | ||
18 | - android:layout_height="wrap_content" | ||
19 | - android:orientation="vertical" | ||
20 | - app:layout_constraintGuide_percent="0.8" /> | ||
21 | - | ||
22 | - <ImageView | ||
23 | - android:id="@+id/iv_campaign_logo" | ||
24 | - android:layout_width="0dp" | ||
25 | - android:layout_height="0dp" | ||
26 | - android:scaleType="centerCrop" | ||
27 | - app:layout_constraintBottom_toBottomOf="parent" | ||
28 | - app:layout_constraintEnd_toEndOf="parent" | ||
29 | - app:layout_constraintStart_toStartOf="parent" | ||
30 | - app:layout_constraintTop_toTopOf="parent" | ||
31 | - tools:src="@drawable/ic_cosmote_logo_horizontal_grey" /> | ||
32 | 16 | ||
33 | <androidx.constraintlayout.widget.ConstraintLayout | 17 | <androidx.constraintlayout.widget.ConstraintLayout |
34 | - android:layout_width="0dp" | 18 | + android:layout_width="match_parent" |
35 | android:layout_height="match_parent" | 19 | android:layout_height="match_parent" |
36 | - android:background="@drawable/svg_background_more" | 20 | + android:background="@drawable/selector_cos_campaign"> |
37 | - android:orientation="vertical" | ||
38 | - app:layout_constraintBottom_toBottomOf="parent" | ||
39 | - app:layout_constraintEnd_toStartOf="@+id/gl_vertical_80_percent" | ||
40 | - app:layout_constraintStart_toStartOf="parent" | ||
41 | - app:layout_constraintTop_toTopOf="parent"> | ||
42 | 21 | ||
43 | <androidx.constraintlayout.widget.Guideline | 22 | <androidx.constraintlayout.widget.Guideline |
44 | - android:id="@+id/gl_vertical_80_percent_inner" | 23 | + android:id="@+id/gl_vertical_80_percent" |
45 | android:layout_width="wrap_content" | 24 | android:layout_width="wrap_content" |
46 | android:layout_height="wrap_content" | 25 | android:layout_height="wrap_content" |
47 | android:orientation="vertical" | 26 | android:orientation="vertical" |
48 | app:layout_constraintGuide_percent="0.8" /> | 27 | app:layout_constraintGuide_percent="0.8" /> |
49 | 28 | ||
50 | - <TextView | 29 | + <ImageView |
51 | - android:id="@+id/tv_campaign_title" | 30 | + android:id="@+id/iv_campaign_logo" |
52 | android:layout_width="0dp" | 31 | android:layout_width="0dp" |
53 | - android:layout_height="wrap_content" | 32 | + android:layout_height="0dp" |
54 | - android:layout_marginHorizontal="12dp" | 33 | + android:scaleType="centerCrop" |
55 | - android:layout_marginTop="20dp" | 34 | + app:layout_constraintBottom_toBottomOf="parent" |
56 | - android:maxLines="2" | 35 | + app:layout_constraintEnd_toEndOf="parent" |
57 | - android:textColor="@color/blue_dark" | ||
58 | - android:textSize="18sp" | ||
59 | - android:textStyle="bold" | ||
60 | - app:layout_constraintEnd_toStartOf="@+id/gl_vertical_80_percent_inner" | ||
61 | app:layout_constraintStart_toStartOf="parent" | 36 | app:layout_constraintStart_toStartOf="parent" |
62 | app:layout_constraintTop_toTopOf="parent" | 37 | app:layout_constraintTop_toTopOf="parent" |
63 | - tools:text="ΔΙΑΓΩΝΙΣΜΟΣ ΑΓΙΟΥ ΒΑΛΕΝΤΙΝΟΥ!" /> | 38 | + tools:src="@drawable/ic_cosmote_logo_horizontal_grey" /> |
64 | 39 | ||
65 | - <TextView | 40 | + <androidx.constraintlayout.widget.ConstraintLayout |
66 | - android:id="@+id/tv_campaign_subtitle" | ||
67 | android:layout_width="0dp" | 41 | android:layout_width="0dp" |
68 | - android:layout_height="wrap_content" | 42 | + android:layout_height="match_parent" |
69 | - android:layout_marginHorizontal="12dp" | 43 | + android:background="@drawable/svg_background_more" |
70 | - android:layout_marginBottom="20dp" | 44 | + android:orientation="vertical" |
71 | - android:maxLines="4" | ||
72 | - android:textColor="@color/blue_dark" | ||
73 | - android:textSize="16sp" | ||
74 | - android:textStyle="bold" | ||
75 | app:layout_constraintBottom_toBottomOf="parent" | 45 | app:layout_constraintBottom_toBottomOf="parent" |
76 | - app:layout_constraintEnd_toStartOf="@+id/gl_vertical_80_percent_inner" | 46 | + app:layout_constraintEnd_toStartOf="@+id/gl_vertical_80_percent" |
77 | app:layout_constraintStart_toStartOf="parent" | 47 | app:layout_constraintStart_toStartOf="parent" |
78 | - tools:text="Σπάσε την πινιάτα και κέρδισε μοναδικά δώρα εσύ και το ταίρι σου!" /> | 48 | + app:layout_constraintTop_toTopOf="parent"> |
49 | + | ||
50 | + <androidx.constraintlayout.widget.Guideline | ||
51 | + android:id="@+id/gl_vertical_80_percent_inner" | ||
52 | + android:layout_width="wrap_content" | ||
53 | + android:layout_height="wrap_content" | ||
54 | + android:orientation="vertical" | ||
55 | + app:layout_constraintGuide_percent="0.8" /> | ||
56 | + | ||
57 | + <TextView | ||
58 | + android:id="@+id/tv_campaign_title" | ||
59 | + android:layout_width="0dp" | ||
60 | + android:layout_height="wrap_content" | ||
61 | + android:layout_marginHorizontal="12dp" | ||
62 | + android:layout_marginTop="20dp" | ||
63 | + android:maxLines="4" | ||
64 | + android:textColor="@color/blue_dark" | ||
65 | + android:textSize="18sp" | ||
66 | + android:textStyle="bold" | ||
67 | + app:layout_constraintEnd_toStartOf="@+id/gl_vertical_80_percent_inner" | ||
68 | + app:layout_constraintStart_toStartOf="parent" | ||
69 | + app:layout_constraintTop_toTopOf="parent" | ||
70 | + tools:text="ΔΙΑΓΩΝΙΣΜΟΣ ΑΓΙΟΥ ΒΑΛΕΝΤΙΝΟΥ!" /> | ||
71 | + | ||
72 | + <TextView | ||
73 | + android:id="@+id/tv_campaign_subtitle" | ||
74 | + android:layout_width="0dp" | ||
75 | + android:layout_height="wrap_content" | ||
76 | + android:layout_marginHorizontal="12dp" | ||
77 | + android:layout_marginTop="6dp" | ||
78 | + android:maxLines="4" | ||
79 | + android:textColor="@color/blue_dark" | ||
80 | + android:textSize="16sp" | ||
81 | + app:layout_constraintEnd_toStartOf="@+id/gl_vertical_80_percent_inner" | ||
82 | + app:layout_constraintStart_toStartOf="parent" | ||
83 | + app:layout_constraintTop_toBottomOf="@+id/tv_campaign_title" | ||
84 | + tools:text="Σπάσε την πινιάτα και κέρδισε μοναδικά δώρα εσύ και το ταίρι σου!" /> | ||
85 | + | ||
86 | + <TextView | ||
87 | + android:id="@+id/tv_campaign_message" | ||
88 | + android:layout_width="0dp" | ||
89 | + android:layout_height="wrap_content" | ||
90 | + android:layout_marginHorizontal="12dp" | ||
91 | + android:layout_marginBottom="16dp" | ||
92 | + android:maxLines="4" | ||
93 | + android:textColor="@color/blue_dark" | ||
94 | + android:textSize="16sp" | ||
95 | + android:textStyle="bold" | ||
96 | + app:layout_constraintBottom_toBottomOf="parent" | ||
97 | + app:layout_constraintEnd_toStartOf="@+id/gl_vertical_80_percent_inner" | ||
98 | + app:layout_constraintStart_toStartOf="parent" | ||
99 | + tools:text="Σπάσε την πινιάτα και κέρδισε μοναδικά δώρα εσύ και το ταίρι σου!" /> | ||
100 | + </androidx.constraintlayout.widget.ConstraintLayout> | ||
79 | </androidx.constraintlayout.widget.ConstraintLayout> | 101 | </androidx.constraintlayout.widget.ConstraintLayout> |
80 | - </androidx.constraintlayout.widget.ConstraintLayout> | ||
81 | -</androidx.cardview.widget.CardView> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
102 | + </androidx.cardview.widget.CardView> | ||
103 | + | ||
104 | + <ImageView | ||
105 | + android:id="@+id/iv_campaign_new" | ||
106 | + android:layout_width="56dp" | ||
107 | + android:layout_height="24dp" | ||
108 | + android:layout_alignParentEnd="true" | ||
109 | + android:layout_marginTop="8dp" | ||
110 | + android:layout_marginEnd="12dp" | ||
111 | + android:scaleType="centerCrop" | ||
112 | + android:src="@drawable/ic_new_icon" | ||
113 | + android:translationZ="2dp" | ||
114 | + android:visibility="gone" | ||
115 | + app:layout_constraintEnd_toEndOf="parent" | ||
116 | + app:layout_constraintTop_toTopOf="parent" | ||
117 | + tools:visibility="visible" /> | ||
118 | +</RelativeLayout> | ||
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
... | @@ -61,11 +61,11 @@ | ... | @@ -61,11 +61,11 @@ |
61 | <string name="cos_past_all_coupons">Παλαιότερα κουπόνια</string> | 61 | <string name="cos_past_all_coupons">Παλαιότερα κουπόνια</string> |
62 | <string name="cos_coupon_expired_date">Εξαργυρώθηκε την %1$s</string> | 62 | <string name="cos_coupon_expired_date">Εξαργυρώθηκε την %1$s</string> |
63 | <string name="cos_popup_gifts_title">COSMOTE GIFTS FOR YOU</string> | 63 | <string name="cos_popup_gifts_title">COSMOTE GIFTS FOR YOU</string> |
64 | - <string name="cos_popup_gifts_subtitle">Εδώ μπορείς να βρεις τα διαθέσιμα\nδώρα και προσφορές!</string> | 64 | + <string name="cos_popup_gifts_subtitle">Σε αυτή την ενότητα βρίσκεις τα διαθέσιμα δώρα και επιβραβεύσεις αποκλειστικά για σένα!</string> |
65 | <string name="cos_mycoupon_date">Το κουπόνι ισχύει έως %1$s</string> | 65 | <string name="cos_mycoupon_date">Το κουπόνι ισχύει έως %1$s</string> |
66 | <string name="cos_gift_it">Κάντο δώρο!</string> | 66 | <string name="cos_gift_it">Κάντο δώρο!</string> |
67 | <string name="cos_popup_more_title">COSMOTE MORE FOR YOU</string> | 67 | <string name="cos_popup_more_title">COSMOTE MORE FOR YOU</string> |
68 | - <string name="cos_popup_more_subtitle">Εδώ μπορείς να βρεις διαγωνισμούς και\nνα σε επιβραβεύσουμε για τις αθλητικές σου\nδραστηριότητες!</string> | 68 | + <string name="cos_popup_more_subtitle">Σε αυτή την ενότητα βρες έρευνες, παιχνίδια, διαγωνισμούς και επιβραβεύσεις για τις αθλητικές σου δραστηριότητες!</string> |
69 | <string name="cos_deals_win_title">Μέχρι τώρα έχεις κερδίσει %1$s€ σε προσφορές από %2$s κουπόνια!</string> | 69 | <string name="cos_deals_win_title">Μέχρι τώρα έχεις κερδίσει %1$s€ σε προσφορές από %2$s κουπόνια!</string> |
70 | <string name="cos_deals_win_title_cos">Μέχρι τώρα έχεις κερδίσει %1$s€ με το DEALS for YOU!</string> | 70 | <string name="cos_deals_win_title_cos">Μέχρι τώρα έχεις κερδίσει %1$s€ με το DEALS for YOU!</string> |
71 | <string name="cos_mygifts">Τα δώρα μου</string> | 71 | <string name="cos_mygifts">Τα δώρα μου</string> |
... | @@ -84,6 +84,7 @@ | ... | @@ -84,6 +84,7 @@ |
84 | <string name="cos_dlg_reject_text">Είσαι σίγουρος ότι θέλεις να απορρίψεις το δώρο που μόλις έλαβες;</string> | 84 | <string name="cos_dlg_reject_text">Είσαι σίγουρος ότι θέλεις να απορρίψεις το δώρο που μόλις έλαβες;</string> |
85 | <string name="cos_dlg_return_text">Έλαβες πίσω το δώρο σου, κουπόνι αξίας 100€ για τα Intersport</string> | 85 | <string name="cos_dlg_return_text">Έλαβες πίσω το δώρο σου, κουπόνι αξίας 100€ για τα Intersport</string> |
86 | <string name="cos_dlg_negative_button2">Άκυρο</string> | 86 | <string name="cos_dlg_negative_button2">Άκυρο</string> |
87 | + <string name="cos_profile_preferences">+Προτιμήσεις</string> | ||
87 | 88 | ||
88 | <string-array name="coupons_array"> | 89 | <string-array name="coupons_array"> |
89 | <item>Κουπόνια</item> | 90 | <item>Κουπόνια</item> | ... | ... |
-
Please register or login to post a comment