Showing
22 changed files
with
688 additions
and
514 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-cosbeta14' | 5 | + PUBLISH_VERSION = '4.5.4-cosbeta15' |
6 | PUBLISH_ARTIFACT_ID = 'warply-android-sdk' | 6 | PUBLISH_ARTIFACT_ID = 'warply-android-sdk' |
7 | } | 7 | } |
8 | 8 | ... | ... |
... | @@ -4,7 +4,6 @@ import android.app.Activity; | ... | @@ -4,7 +4,6 @@ import android.app.Activity; |
4 | import android.content.Intent; | 4 | import android.content.Intent; |
5 | import android.graphics.Bitmap; | 5 | import android.graphics.Bitmap; |
6 | import android.graphics.Color; | 6 | import android.graphics.Color; |
7 | -import android.graphics.Paint; | ||
8 | import android.os.Bundle; | 7 | import android.os.Bundle; |
9 | import android.text.TextUtils; | 8 | import android.text.TextUtils; |
10 | import android.view.View; | 9 | import android.view.View; |
... | @@ -121,7 +120,11 @@ public class CouponInfoActivity extends Activity implements View.OnClickListener | ... | @@ -121,7 +120,11 @@ public class CouponInfoActivity extends Activity implements View.OnClickListener |
121 | // mTvTerms.setPaintFlags(mTvTerms.getPaintFlags() | Paint.UNDERLINE_TEXT_FLAG); | 120 | // mTvTerms.setPaintFlags(mTvTerms.getPaintFlags() | Paint.UNDERLINE_TEXT_FLAG); |
122 | mLlGiftIt.setOnClickListener(this); | 121 | mLlGiftIt.setOnClickListener(this); |
123 | 122 | ||
124 | - createBarcodeBitmap(mCoupon.getCoupon()); | 123 | + String tempCoupon = mCoupon.getCoupon(); |
124 | + for (int i = 0; i < (12 - mCoupon.getCoupon().length()); i++) { | ||
125 | + tempCoupon += "0"; | ||
126 | + } | ||
127 | + createBarcodeBitmap(tempCoupon); | ||
125 | } | 128 | } |
126 | 129 | ||
127 | private void createBarcodeBitmap(String barcodeString) { | 130 | private void createBarcodeBitmap(String barcodeString) { | ... | ... |
... | @@ -224,7 +224,7 @@ public class GiftsForYouActivity extends Activity implements View.OnClickListene | ... | @@ -224,7 +224,7 @@ public class GiftsForYouActivity extends Activity implements View.OnClickListene |
224 | } | 224 | } |
225 | 225 | ||
226 | private ArrayList<MergedGifts> mergeDatasets(CampaignList campaignList, CouponsetsList couponsetsList) { | 226 | private ArrayList<MergedGifts> mergeDatasets(CampaignList campaignList, CouponsetsList couponsetsList) { |
227 | - if (campaignList.size() > 0) { | 227 | + if (campaignList != null && campaignList.size() > 0) { |
228 | for (Campaign campaign : campaignList) { | 228 | for (Campaign campaign : campaignList) { |
229 | MergedGifts data = new MergedGifts(); | 229 | MergedGifts data = new MergedGifts(); |
230 | data.setCampaign(campaign); | 230 | data.setCampaign(campaign); |
... | @@ -234,7 +234,7 @@ public class GiftsForYouActivity extends Activity implements View.OnClickListene | ... | @@ -234,7 +234,7 @@ public class GiftsForYouActivity extends Activity implements View.OnClickListene |
234 | } | 234 | } |
235 | } | 235 | } |
236 | 236 | ||
237 | - if (couponsetsList.size() > 0) { | 237 | + if (couponsetsList != null && couponsetsList.size() > 0) { |
238 | for (Couponset couponset : couponsetsList) { | 238 | for (Couponset couponset : couponsetsList) { |
239 | MergedGifts data = new MergedGifts(); | 239 | MergedGifts data = new MergedGifts(); |
240 | data.setCampaign(null); | 240 | data.setCampaign(null); | ... | ... |
... | @@ -10,11 +10,27 @@ import android.widget.LinearLayout; | ... | @@ -10,11 +10,27 @@ import android.widget.LinearLayout; |
10 | import android.widget.TextView; | 10 | import android.widget.TextView; |
11 | 11 | ||
12 | import androidx.constraintlayout.widget.ConstraintLayout; | 12 | import androidx.constraintlayout.widget.ConstraintLayout; |
13 | +import androidx.recyclerview.widget.LinearLayoutManager; | ||
14 | +import androidx.recyclerview.widget.RecyclerView; | ||
15 | + | ||
16 | +import org.greenrobot.eventbus.EventBus; | ||
17 | + | ||
18 | +import java.io.Serializable; | ||
19 | +import java.text.ParseException; | ||
20 | +import java.text.SimpleDateFormat; | ||
21 | +import java.util.Collections; | ||
22 | +import java.util.Comparator; | ||
23 | +import java.util.Date; | ||
24 | +import java.util.concurrent.TimeUnit; | ||
13 | 25 | ||
14 | import ly.warp.sdk.R; | 26 | import ly.warp.sdk.R; |
27 | +import ly.warp.sdk.io.models.ActiveDFYCouponModel; | ||
15 | import ly.warp.sdk.io.models.Coupon; | 28 | import ly.warp.sdk.io.models.Coupon; |
16 | import ly.warp.sdk.io.models.CouponList; | 29 | import ly.warp.sdk.io.models.CouponList; |
30 | +import ly.warp.sdk.io.models.WarplyDealsAnalysisEventModel; | ||
17 | import ly.warp.sdk.utils.WarplyManagerHelper; | 31 | import ly.warp.sdk.utils.WarplyManagerHelper; |
32 | +import ly.warp.sdk.utils.managers.WarplyEventBusManager; | ||
33 | +import ly.warp.sdk.views.adapters.ActiveCouponAdapter; | ||
18 | 34 | ||
19 | 35 | ||
20 | public class LoyaltyWallet extends Activity implements View.OnClickListener { | 36 | public class LoyaltyWallet extends Activity implements View.OnClickListener { |
... | @@ -28,11 +44,16 @@ public class LoyaltyWallet extends Activity implements View.OnClickListener { | ... | @@ -28,11 +44,16 @@ public class LoyaltyWallet extends Activity implements View.OnClickListener { |
28 | // =========================================================== | 44 | // =========================================================== |
29 | 45 | ||
30 | private ImageView mIvBack; | 46 | private ImageView mIvBack; |
31 | - private TextView mTvUsername, mTvActiveCoupons, | 47 | + private TextView mTvUsername, mTvDealsValue, mTvDealsValueAll, |
32 | - mTvActiveRewards, mTvUserBadge; | 48 | + mTvUserBadge, mTvGiftsValue, mTvGiftsValueAll, mTvActiveCode, mTvActiveDate; |
33 | - private ConstraintLayout mClActiveCoupons, mClActiveRewards, mClActiveGifts; | 49 | + private ConstraintLayout mClDealsBanner, |
34 | - private LinearLayout mLlAnalysisButton, mLlQuestionnaire, mLlUserBadge, | 50 | + mClGiftsBanner; |
35 | - mLlPastCoupons; | 51 | + private LinearLayout mLlQuestionnaire, mLlUserBadge; |
52 | + float couponValue = 0.0f, couponDfyValue = 0.0f; | ||
53 | + int couponCount = 0; | ||
54 | + private RecyclerView mRecyclerCoupons; | ||
55 | + private ActiveCouponAdapter mAdapterCoupons; | ||
56 | + CouponList cpnlist = new CouponList(); | ||
36 | 57 | ||
37 | // =========================================================== | 58 | // =========================================================== |
38 | // Methods for/from SuperClass/Interfaces | 59 | // Methods for/from SuperClass/Interfaces |
... | @@ -44,13 +65,53 @@ public class LoyaltyWallet extends Activity implements View.OnClickListener { | ... | @@ -44,13 +65,53 @@ public class LoyaltyWallet extends Activity implements View.OnClickListener { |
44 | setContentView(R.layout.activity_loyalty_wallet); | 65 | setContentView(R.layout.activity_loyalty_wallet); |
45 | 66 | ||
46 | mIvBack = findViewById(R.id.iv_back); | 67 | mIvBack = findViewById(R.id.iv_back); |
47 | -// mTvAnalysisButton = findViewById(R.id.rl_analysis_row).findViewById(R.id.cl_chart_info).findViewById(R.id.tv_analysis_details); | ||
48 | mTvUsername = findViewById(R.id.tv_name); | 68 | mTvUsername = findViewById(R.id.tv_name); |
49 | mLlQuestionnaire = findViewById(R.id.ll_user_questionnaire); | 69 | mLlQuestionnaire = findViewById(R.id.ll_user_questionnaire); |
50 | mLlUserBadge = findViewById(R.id.ll_user_badge); | 70 | mLlUserBadge = findViewById(R.id.ll_user_badge); |
51 | - mTvActiveRewards = findViewById(R.id.tv_active_deals_text); | ||
52 | mTvUserBadge = findViewById(R.id.tv_type); | 71 | mTvUserBadge = findViewById(R.id.tv_type); |
53 | - mClActiveGifts = findViewById(R.id.cl_mygifts); | 72 | + mTvGiftsValue = findViewById(R.id.tv_gifts_value); |
73 | + mTvGiftsValueAll = findViewById(R.id.tv_gifts_value_all); | ||
74 | + mClDealsBanner = findViewById(R.id.cl_deals_cos); | ||
75 | + mClGiftsBanner = findViewById(R.id.cl_deals_win); | ||
76 | + mTvDealsValue = findViewById(R.id.tv_deals_value); | ||
77 | + mTvDealsValueAll = findViewById(R.id.tv_deals_value_all); | ||
78 | + mTvActiveCode = findViewById(R.id.tv_active_deals_text); | ||
79 | + mTvActiveDate = findViewById(R.id.tv_active_deals_date_text); | ||
80 | + | ||
81 | + if (WarplyManagerHelper.getActiveDFYCoupons() != null) { | ||
82 | + Collections.sort(WarplyManagerHelper.getActiveDFYCoupons(), new Comparator<ActiveDFYCouponModel>() { | ||
83 | + public int compare(ActiveDFYCouponModel o1, ActiveDFYCouponModel o2) { | ||
84 | + return o1.getDate().compareTo(o2.getDate()); | ||
85 | + } | ||
86 | + }); | ||
87 | + | ||
88 | + for (ActiveDFYCouponModel dfycoupon : WarplyManagerHelper.getActiveDFYCoupons()) { | ||
89 | + try { | ||
90 | + couponDfyValue += Float.parseFloat(dfycoupon.getValue()); | ||
91 | + } catch (NumberFormatException e) { | ||
92 | + | ||
93 | + } | ||
94 | + } | ||
95 | + } | ||
96 | + | ||
97 | + if (WarplyManagerHelper.getCouponList() != null) { | ||
98 | + for (Coupon coupon : WarplyManagerHelper.getCouponList()) { | ||
99 | + if (coupon.getStatus() == 1) { | ||
100 | + try { | ||
101 | + cpnlist.add(coupon); | ||
102 | + couponCount += 1; | ||
103 | + couponValue += Float.parseFloat(coupon.getDiscount()); | ||
104 | + } catch (NumberFormatException e) { | ||
105 | + cpnlist.remove(coupon); | ||
106 | + couponCount -= 1; | ||
107 | + } | ||
108 | + } | ||
109 | + } | ||
110 | + | ||
111 | + mRecyclerCoupons = findViewById(R.id.rv_active_coupons); | ||
112 | + mRecyclerCoupons.setNestedScrollingEnabled(false); | ||
113 | + mRecyclerCoupons.setLayoutManager(new LinearLayoutManager(this, LinearLayoutManager.VERTICAL, false)); | ||
114 | + } | ||
54 | 115 | ||
55 | initViews(); | 116 | initViews(); |
56 | } | 117 | } |
... | @@ -70,9 +131,14 @@ public class LoyaltyWallet extends Activity implements View.OnClickListener { | ... | @@ -70,9 +131,14 @@ public class LoyaltyWallet extends Activity implements View.OnClickListener { |
70 | startActivity(WarpViewActivity.createIntentFromURL(LoyaltyWallet.this, WarplyManagerHelper.openQuestionnaire())); | 131 | startActivity(WarpViewActivity.createIntentFromURL(LoyaltyWallet.this, WarplyManagerHelper.openQuestionnaire())); |
71 | return; | 132 | return; |
72 | } | 133 | } |
73 | - if (view.getId() == R.id.cl_mygifts) { | 134 | + if (view.getId() == R.id.cl_deals_cos) { |
74 | - Intent intent = new Intent(LoyaltyWallet.this, ActiveGiftsActivity.class); | 135 | + WarplyDealsAnalysisEventModel warplyDealsAnalysisEventModel = new WarplyDealsAnalysisEventModel(); |
75 | - startActivity(intent); | 136 | + warplyDealsAnalysisEventModel.setPressed(true); |
137 | + EventBus.getDefault().post(new WarplyEventBusManager(warplyDealsAnalysisEventModel)); | ||
138 | + return; | ||
139 | + } | ||
140 | + if (view.getId() == R.id.cl_deals_win) { | ||
141 | + | ||
76 | } | 142 | } |
77 | } | 143 | } |
78 | 144 | ||
... | @@ -81,10 +147,37 @@ public class LoyaltyWallet extends Activity implements View.OnClickListener { | ... | @@ -81,10 +147,37 @@ public class LoyaltyWallet extends Activity implements View.OnClickListener { |
81 | // =========================================================== | 147 | // =========================================================== |
82 | 148 | ||
83 | private void initViews() { | 149 | private void initViews() { |
84 | - CouponList cpnlist = new CouponList(); | 150 | + mAdapterCoupons = new ActiveCouponAdapter(this, cpnlist); |
85 | - for (Coupon cpn : WarplyManagerHelper.getCouponList()) { | 151 | + mRecyclerCoupons.setAdapter(mAdapterCoupons); |
86 | - if (cpn.getStatus() == 1) | 152 | + mAdapterCoupons.getPositionClicks() |
87 | - cpnlist.add(cpn); | 153 | + .doOnNext(coupon -> { |
154 | + Intent intent = new Intent(LoyaltyWallet.this, CouponInfoActivity.class); | ||
155 | + intent.putExtra("coupon", (Serializable) coupon); | ||
156 | + startActivity(intent); | ||
157 | + }) | ||
158 | + .doOnError(error -> { | ||
159 | + }) | ||
160 | + .subscribe(); | ||
161 | + | ||
162 | + mTvGiftsValue.setText(String.format(getString(R.string.cos_value), String.valueOf(couponValue))); | ||
163 | + mTvGiftsValueAll.setText(String.format(getString(R.string.cos_deals_win_title), String.valueOf(couponValue), String.valueOf(couponCount))); | ||
164 | + mTvDealsValue.setText(String.format(getString(R.string.cos_value), String.valueOf(couponDfyValue))); | ||
165 | + mTvDealsValueAll.setText(String.format(getString(R.string.cos_deals_win_title_cos), String.valueOf(couponDfyValue))); | ||
166 | + if (WarplyManagerHelper.getActiveDFYCoupons() != null && WarplyManagerHelper.getActiveDFYCoupons().size() > 0) { | ||
167 | + mTvActiveCode.setText(WarplyManagerHelper.getActiveDFYCoupons().get(0).getCode()); | ||
168 | + | ||
169 | + SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd hh:mm"); | ||
170 | + String date1 = WarplyManagerHelper.getActiveDFYCoupons().get(0).getDate(); | ||
171 | + String date2 = dateFormat.format(new Date()); | ||
172 | + | ||
173 | + try { | ||
174 | + Date toDate = dateFormat.parse(date2); | ||
175 | + Date fromDate = dateFormat.parse(date1); | ||
176 | + long diff = TimeUnit.MILLISECONDS.toDays(fromDate.getTime() - toDate.getTime()); | ||
177 | + mTvActiveDate.setText(String.format(getString(R.string.cos_active_coupon_date), String.valueOf(diff))); | ||
178 | + } catch (ParseException e) { | ||
179 | + e.printStackTrace(); | ||
180 | + } | ||
88 | } | 181 | } |
89 | 182 | ||
90 | if (WarplyManagerHelper.getConsumer() != null) { | 183 | if (WarplyManagerHelper.getConsumer() != null) { |
... | @@ -102,12 +195,10 @@ public class LoyaltyWallet extends Activity implements View.OnClickListener { | ... | @@ -102,12 +195,10 @@ public class LoyaltyWallet extends Activity implements View.OnClickListener { |
102 | } | 195 | } |
103 | 196 | ||
104 | mIvBack.setOnClickListener(this); | 197 | mIvBack.setOnClickListener(this); |
105 | -// mTvAnalysisButton.setOnClickListener(this); | ||
106 | mLlQuestionnaire.setOnClickListener(this); | 198 | mLlQuestionnaire.setOnClickListener(this); |
107 | - //TODO: change the parameter, for testing purposes only | ||
108 | - mTvActiveRewards.setText(String.format(getResources().getString(R.string.cos_active_rewards), String.valueOf(cpnlist.size()))); | ||
109 | - mClActiveGifts.setOnClickListener(this); | ||
110 | mLlUserBadge.setOnClickListener(this); | 199 | mLlUserBadge.setOnClickListener(this); |
200 | + mClDealsBanner.setOnClickListener(this); | ||
201 | + mClGiftsBanner.setOnClickListener(this); | ||
111 | } | 202 | } |
112 | 203 | ||
113 | // =========================================================== | 204 | // =========================================================== | ... | ... |
... | @@ -127,6 +127,8 @@ public class WarpViewActivity extends WarpBaseActivity { | ... | @@ -127,6 +127,8 @@ public class WarpViewActivity extends WarpBaseActivity { |
127 | EventBus.getDefault().unregister(this); | 127 | EventBus.getDefault().unregister(this); |
128 | if (event.getQuestionnaire() != null) | 128 | if (event.getQuestionnaire() != null) |
129 | EventBus.getDefault().post(new WarplyEventBusManager(event.getQuestionnaire())); | 129 | EventBus.getDefault().post(new WarplyEventBusManager(event.getQuestionnaire())); |
130 | + if (event.getCoupon() != null) | ||
131 | + EventBus.getDefault().post(new WarplyEventBusManager(event.getCoupon())); | ||
130 | finish(); | 132 | finish(); |
131 | } | 133 | } |
132 | 134 | ... | ... |
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 22-June-22. | ||
31 | + */ | ||
32 | + | ||
33 | +public class ActiveDFYCouponModel { | ||
34 | + private String value; | ||
35 | + private String date; | ||
36 | + private String code; | ||
37 | + | ||
38 | + public ActiveDFYCouponModel() { | ||
39 | + this.value = ""; | ||
40 | + this.date = ""; | ||
41 | + this.code = ""; | ||
42 | + } | ||
43 | + | ||
44 | + public String getValue() { | ||
45 | + return value; | ||
46 | + } | ||
47 | + | ||
48 | + public void setValue(String value) { | ||
49 | + this.value = value; | ||
50 | + } | ||
51 | + | ||
52 | + public String getDate() { | ||
53 | + return date; | ||
54 | + } | ||
55 | + | ||
56 | + public void setDate(String date) { | ||
57 | + this.date = date; | ||
58 | + } | ||
59 | + | ||
60 | + public String getCode() { | ||
61 | + return code; | ||
62 | + } | ||
63 | + | ||
64 | + public void setCode(String code) { | ||
65 | + this.code = code; | ||
66 | + } | ||
67 | +} |
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 21-June-22. | ||
31 | + */ | ||
32 | + | ||
33 | +public class CouponEventModel { | ||
34 | + private boolean success; | ||
35 | + | ||
36 | + public CouponEventModel() { | ||
37 | + this.success = false; | ||
38 | + } | ||
39 | + | ||
40 | + public boolean isSuccess() { | ||
41 | + return success; | ||
42 | + } | ||
43 | + | ||
44 | + public void setSuccess(boolean success) { | ||
45 | + this.success = success; | ||
46 | + } | ||
47 | +} |
1 | +package ly.warp.sdk.io.models; | ||
2 | + | ||
3 | +/** | ||
4 | + * Created by Panagiotis Triantafyllou on 22/Ιουν/2022. | ||
5 | + */ | ||
6 | + | ||
7 | + | ||
8 | +public class LoyaltyGiftsForYouPackage { | ||
9 | + private String title; | ||
10 | + private String imageUrl; | ||
11 | + private String loyaltyPackageId; | ||
12 | + | ||
13 | + public LoyaltyGiftsForYouPackage() { | ||
14 | + this.title = ""; | ||
15 | + this.imageUrl = ""; | ||
16 | + this.loyaltyPackageId = ""; | ||
17 | + } | ||
18 | + | ||
19 | + public String getTitle() { | ||
20 | + return title; | ||
21 | + } | ||
22 | + | ||
23 | + public void setTitle(String title) { | ||
24 | + this.title = title; | ||
25 | + } | ||
26 | + | ||
27 | + public String getImageUrl() { | ||
28 | + return imageUrl; | ||
29 | + } | ||
30 | + | ||
31 | + public void setImageUrl(String imageUrl) { | ||
32 | + this.imageUrl = imageUrl; | ||
33 | + } | ||
34 | + | ||
35 | + public String getLoyaltyPackageId() { | ||
36 | + return loyaltyPackageId; | ||
37 | + } | ||
38 | + | ||
39 | + public void setLoyaltyPackageId(String loyaltyPackageId) { | ||
40 | + this.loyaltyPackageId = loyaltyPackageId; | ||
41 | + } | ||
42 | +} |
... | @@ -12,7 +12,6 @@ import java.security.NoSuchAlgorithmException; | ... | @@ -12,7 +12,6 @@ import java.security.NoSuchAlgorithmException; |
12 | import java.util.ArrayList; | 12 | import java.util.ArrayList; |
13 | import java.util.HashMap; | 13 | import java.util.HashMap; |
14 | 14 | ||
15 | -import ly.warp.sdk.utils.WarplyManagerHelper; | ||
16 | import ly.warp.sdk.utils.constants.WarpConstants; | 15 | import ly.warp.sdk.utils.constants.WarpConstants; |
17 | 16 | ||
18 | /** | 17 | /** |
... | @@ -29,6 +28,8 @@ public class WarplyIntegrationRequest { | ... | @@ -29,6 +28,8 @@ public class WarplyIntegrationRequest { |
29 | private final String KEY_ACTION = "action"; | 28 | private final String KEY_ACTION = "action"; |
30 | private final String KEY_ACTION_VALUE = "integration"; | 29 | private final String KEY_ACTION_VALUE = "integration"; |
31 | private final String KEY_DATA = "data"; | 30 | private final String KEY_DATA = "data"; |
31 | + private final String KEY_METHOD = "method"; | ||
32 | + private final String KEY_METHOD_VALUE = "consumer_extra_data"; | ||
32 | 33 | ||
33 | // =========================================================== | 34 | // =========================================================== |
34 | // Fields | 35 | // Fields |
... | @@ -143,12 +144,16 @@ public class WarplyIntegrationRequest { | ... | @@ -143,12 +144,16 @@ public class WarplyIntegrationRequest { |
143 | try { | 144 | try { |
144 | JSONObject extraJson = new JSONObject(); | 145 | JSONObject extraJson = new JSONObject(); |
145 | extraJson.putOpt(KEY_ACTION, KEY_ACTION_VALUE); | 146 | extraJson.putOpt(KEY_ACTION, KEY_ACTION_VALUE); |
146 | - | 147 | + extraJson.putOpt(KEY_METHOD, KEY_METHOD_VALUE); |
148 | + ArrayList list = new ArrayList(); | ||
149 | + list.add("6982853746"); | ||
150 | + list.add("6982853747"); | ||
151 | + list.add("6982853748"); | ||
147 | JSONObject data = new JSONObject(); | 152 | JSONObject data = new JSONObject(); |
148 | - data.putOpt("nonTelco", WarplyManagerHelper.loadCustomerState().isNonTelco()); | 153 | + data.putOpt("nonTelco", false); |
149 | - data.putOpt("acceptedConsent", WarplyManagerHelper.loadCustomerState().isAcceptedConsent()); | 154 | + data.putOpt("acceptedConsent", true); |
150 | - data.putOpt("msisdnList", new JSONArray(WarplyManagerHelper.loadCustomerState().getMsisdnList())); | 155 | + data.putOpt("msisdnList", new JSONArray(list)); |
151 | - data.putOpt("guid", WarplyManagerHelper.loadCustomerState().getGuid()); | 156 | + data.putOpt("guid", "12345678"); |
152 | 157 | ||
153 | extraJson.putOpt(KEY_DATA, data); | 158 | extraJson.putOpt(KEY_DATA, data); |
154 | bodyJsonObject.putOpt(KEY_MAPP, extraJson); | 159 | bodyJsonObject.putOpt(KEY_MAPP, extraJson); | ... | ... |
... | @@ -25,11 +25,16 @@ | ... | @@ -25,11 +25,16 @@ |
25 | 25 | ||
26 | package ly.warp.sdk.utils; | 26 | package ly.warp.sdk.utils; |
27 | 27 | ||
28 | +import android.util.Log; | ||
29 | + | ||
30 | +import org.json.JSONObject; | ||
31 | + | ||
28 | import java.util.ArrayList; | 32 | import java.util.ArrayList; |
29 | import java.util.HashMap; | 33 | import java.util.HashMap; |
30 | 34 | ||
31 | import ly.warp.sdk.Warply; | 35 | import ly.warp.sdk.Warply; |
32 | import ly.warp.sdk.db.WarplyDBHelper; | 36 | import ly.warp.sdk.db.WarplyDBHelper; |
37 | +import ly.warp.sdk.io.models.ActiveDFYCouponModel; | ||
33 | import ly.warp.sdk.io.models.Campaign; | 38 | import ly.warp.sdk.io.models.Campaign; |
34 | import ly.warp.sdk.io.models.CampaignList; | 39 | import ly.warp.sdk.io.models.CampaignList; |
35 | import ly.warp.sdk.io.models.Consumer; | 40 | import ly.warp.sdk.io.models.Consumer; |
... | @@ -37,6 +42,7 @@ import ly.warp.sdk.io.models.CouponList; | ... | @@ -37,6 +42,7 @@ import ly.warp.sdk.io.models.CouponList; |
37 | import ly.warp.sdk.io.models.CouponsetsList; | 42 | import ly.warp.sdk.io.models.CouponsetsList; |
38 | import ly.warp.sdk.io.models.CustomerStateModel; | 43 | import ly.warp.sdk.io.models.CustomerStateModel; |
39 | import ly.warp.sdk.io.models.LoyaltyContextualOfferModel; | 44 | import ly.warp.sdk.io.models.LoyaltyContextualOfferModel; |
45 | +import ly.warp.sdk.io.models.LoyaltyGiftsForYouPackage; | ||
40 | 46 | ||
41 | /** | 47 | /** |
42 | * Created by Panagiotis Triantafyllou on 18-Apr-22. | 48 | * Created by Panagiotis Triantafyllou on 18-Apr-22. |
... | @@ -58,6 +64,9 @@ public class WarplyManagerHelper { | ... | @@ -58,6 +64,9 @@ public class WarplyManagerHelper { |
58 | private static CouponsetsList mCouponsetsList = new CouponsetsList(); | 64 | private static CouponsetsList mCouponsetsList = new CouponsetsList(); |
59 | private static CustomerStateModel mCustomerStateModel; | 65 | private static CustomerStateModel mCustomerStateModel; |
60 | private static CampaignList mCampaignList; | 66 | private static CampaignList mCampaignList; |
67 | + private static ArrayList<ActiveDFYCouponModel> mDfyCoupons = new ArrayList(); | ||
68 | + private static ArrayList<LoyaltyGiftsForYouPackage> mSeasonalList = new ArrayList<>(); | ||
69 | + private static ArrayList<LoyaltyContextualOfferModel> mCCMSList = new ArrayList<>(); | ||
61 | 70 | ||
62 | // =========================================================== | 71 | // =========================================================== |
63 | // Methods for/from SuperClass/Interfaces | 72 | // Methods for/from SuperClass/Interfaces |
... | @@ -93,26 +102,26 @@ public class WarplyManagerHelper { | ... | @@ -93,26 +102,26 @@ public class WarplyManagerHelper { |
93 | /** | 102 | /** |
94 | * Open Warply campaign with sharing id | 103 | * Open Warply campaign with sharing id |
95 | */ | 104 | */ |
96 | - public static String constructCampaignUrlForShare(String sessionUuid, String sharingId) { | 105 | + public static void constructCampaignUrlForShare(String sharingId) { |
97 | - if (getCampaignList() != null) { | 106 | +// if (getCampaignList() != null) { |
98 | - for (Campaign item : getCampaignList()) { | 107 | +// for (Campaign item : getCampaignList()) { |
99 | - if (item.getSessionUUID().equals(sessionUuid)) { | 108 | +// if (item.getSessionUUID().equals(sessionUuid)) { |
100 | - String url = item.getIndexUrl() | 109 | +// String url = item.getIndexUrl() |
101 | - + "?web_id=" + WarpUtils.getWebId(Warply.getWarplyContext()) | 110 | +// + "?web_id=" + WarpUtils.getWebId(Warply.getWarplyContext()) |
102 | - + "&app_uuid=" + WarplyProperty.getAppUuid(Warply.getWarplyContext()) | 111 | +// + "&app_uuid=" + WarplyProperty.getAppUuid(Warply.getWarplyContext()) |
103 | - + "&api_key=" + WarpUtils.getApiKey(Warply.getWarplyContext()) | 112 | +// + "&api_key=" + WarpUtils.getApiKey(Warply.getWarplyContext()) |
104 | - + "&session_uuid=" + item.getSessionUUID() | 113 | +// + "&session_uuid=" + item.getSessionUUID() |
105 | - + "&access_token=" + WarplyDBHelper.getInstance(Warply.getWarplyContext()).getAuthValue("access_token") | 114 | +// + "&access_token=" + WarplyDBHelper.getInstance(Warply.getWarplyContext()).getAuthValue("access_token") |
106 | - + "&refresh_token=" + WarplyDBHelper.getInstance(Warply.getWarplyContext()).getAuthValue("refresh_token") | 115 | +// + "&refresh_token=" + WarplyDBHelper.getInstance(Warply.getWarplyContext()).getAuthValue("refresh_token") |
107 | - + "&client_id=" + WarplyDBHelper.getInstance(Warply.getWarplyContext()).getClientValue("client_id") | 116 | +// + "&client_id=" + WarplyDBHelper.getInstance(Warply.getWarplyContext()).getClientValue("client_id") |
108 | - + "&client_secret=" + WarplyDBHelper.getInstance(Warply.getWarplyContext()).getClientValue("client_secret") | 117 | +// + "&client_secret=" + WarplyDBHelper.getInstance(Warply.getWarplyContext()).getClientValue("client_secret") |
109 | - + "&sharing_id=" + sharingId; | 118 | +// + "&sharing_id=" + sharingId; |
110 | - return url; | 119 | +// return url; |
111 | - } | 120 | +// } |
112 | - } | 121 | +// } |
113 | - } | 122 | +// } |
114 | - | 123 | +// |
115 | - return ""; | 124 | +// return ""; |
116 | } | 125 | } |
117 | 126 | ||
118 | /** | 127 | /** |
... | @@ -122,14 +131,39 @@ public class WarplyManagerHelper { | ... | @@ -122,14 +131,39 @@ public class WarplyManagerHelper { |
122 | return /*url*/ ""; | 131 | return /*url*/ ""; |
123 | } | 132 | } |
124 | 133 | ||
125 | -// public static CampaignList mergeCCMS(ArrayList<LoyaltyContextualOfferModel> ccmslist, CampaignList clist) { | 134 | + private void mergeCCMS() { |
126 | -// CampaignList mergedList = clist; | 135 | + |
127 | -// for (LoyaltyContextualOfferModel element : ccmslist) { | 136 | + } |
128 | -// | 137 | + |
129 | -// } | 138 | + /** |
130 | -// | 139 | + * Set the List with CCMS Campaigns |
131 | -// return mergedList; | 140 | + */ |
132 | -// } | 141 | + public static void setCCMSLoyaltyCampaigns(ArrayList<LoyaltyContextualOfferModel> list) { |
142 | + mCCMSList = list; | ||
143 | + if (mUniqueCampaignList != null && mUniqueCampaignList.get("gifts_for_you") != null && mUniqueCampaignList.get("gifts_for_you").size() > 0) { | ||
144 | + for (Campaign camp : mUniqueCampaignList.get("gifts_for_you")) { | ||
145 | + try { | ||
146 | + String te2 = WarpJSONParser.getJSONFromString(camp.getExtraFields()).keys().next(); | ||
147 | + } catch (Exception exception) { | ||
148 | + Log.v("WarplyManagerHelper_CCMS", exception.toString()); | ||
149 | + } | ||
150 | + } | ||
151 | + } | ||
152 | + } | ||
153 | + | ||
154 | + /** | ||
155 | + * Save the LoyaltyGiftsForYouPackage list | ||
156 | + */ | ||
157 | + public static void setSeasonalList(ArrayList<LoyaltyGiftsForYouPackage> seasonalCoupons) { | ||
158 | + mSeasonalList = seasonalCoupons; | ||
159 | + } | ||
160 | + | ||
161 | + /** | ||
162 | + * Get the LoyaltyGiftsForYouPackage list | ||
163 | + */ | ||
164 | + public static ArrayList<LoyaltyGiftsForYouPackage> getSeasonalList() { | ||
165 | + return mSeasonalList; | ||
166 | + } | ||
133 | 167 | ||
134 | /** | 168 | /** |
135 | * Open Questionnaire | 169 | * Open Questionnaire |
... | @@ -172,22 +206,15 @@ public class WarplyManagerHelper { | ... | @@ -172,22 +206,15 @@ public class WarplyManagerHelper { |
172 | /** | 206 | /** |
173 | * Set the List with active D4Y coupons | 207 | * Set the List with active D4Y coupons |
174 | */ | 208 | */ |
175 | - public static void setActiveDFYCoupons(ArrayList<String> codes) { | 209 | + public static void setActiveDFYCoupons(ArrayList<ActiveDFYCouponModel> dfyCoupons) { |
176 | - | 210 | + mDfyCoupons = dfyCoupons; |
177 | } | 211 | } |
178 | 212 | ||
179 | /** | 213 | /** |
180 | * Get the List with active D4Y coupons | 214 | * Get the List with active D4Y coupons |
181 | */ | 215 | */ |
182 | - public static ArrayList<String> getActiveDFYCoupons() { | 216 | + public static ArrayList<ActiveDFYCouponModel> getActiveDFYCoupons() { |
183 | - return new ArrayList<>(); | 217 | + return mDfyCoupons; |
184 | - } | ||
185 | - | ||
186 | - /** | ||
187 | - * Set the List with CCMS Campaigns | ||
188 | - */ | ||
189 | - public static void setCCMSLoyaltyCampaigns(ArrayList<LoyaltyContextualOfferModel> list) { | ||
190 | -//TODO: create | ||
191 | } | 218 | } |
192 | 219 | ||
193 | public static Consumer getConsumer() { | 220 | public static Consumer getConsumer() { | ... | ... |
... | @@ -2,6 +2,7 @@ package ly.warp.sdk.utils.managers; | ... | @@ -2,6 +2,7 @@ package ly.warp.sdk.utils.managers; |
2 | 2 | ||
3 | import java.util.HashMap; | 3 | import java.util.HashMap; |
4 | 4 | ||
5 | +import ly.warp.sdk.io.models.CouponEventModel; | ||
5 | import ly.warp.sdk.io.models.LoyaltyContextualOfferModel; | 6 | import ly.warp.sdk.io.models.LoyaltyContextualOfferModel; |
6 | import ly.warp.sdk.io.models.LoyaltyGiftsForYouOfferClickEvent; | 7 | import ly.warp.sdk.io.models.LoyaltyGiftsForYouOfferClickEvent; |
7 | import ly.warp.sdk.io.models.LoyaltySDKFirebaseEventModel; | 8 | import ly.warp.sdk.io.models.LoyaltySDKFirebaseEventModel; |
... | @@ -25,6 +26,7 @@ public class WarplyEventBusManager { | ... | @@ -25,6 +26,7 @@ public class WarplyEventBusManager { |
25 | private WarplyCCMSEnabledModel ccmsActivated; | 26 | private WarplyCCMSEnabledModel ccmsActivated; |
26 | private LoyaltyGiftsForYouOfferClickEvent giftsYou; | 27 | private LoyaltyGiftsForYouOfferClickEvent giftsYou; |
27 | private QuestionnaireEventModel questionnaire; | 28 | private QuestionnaireEventModel questionnaire; |
29 | + private CouponEventModel coupon; | ||
28 | 30 | ||
29 | public WarplyEventBusManager() { | 31 | public WarplyEventBusManager() { |
30 | 32 | ||
... | @@ -38,6 +40,10 @@ public class WarplyEventBusManager { | ... | @@ -38,6 +40,10 @@ public class WarplyEventBusManager { |
38 | this.questionnaire = questionnaire; | 40 | this.questionnaire = questionnaire; |
39 | } | 41 | } |
40 | 42 | ||
43 | + public WarplyEventBusManager(CouponEventModel coupon) { | ||
44 | + this.coupon = coupon; | ||
45 | + } | ||
46 | + | ||
41 | public WarplyEventBusManager(LoyaltySDKFirebaseEventModel fireEvent) { | 47 | public WarplyEventBusManager(LoyaltySDKFirebaseEventModel fireEvent) { |
42 | this.fireEvent = fireEvent; | 48 | this.fireEvent = fireEvent; |
43 | } | 49 | } |
... | @@ -127,4 +133,8 @@ public class WarplyEventBusManager { | ... | @@ -127,4 +133,8 @@ public class WarplyEventBusManager { |
127 | public QuestionnaireEventModel getQuestionnaire() { | 133 | public QuestionnaireEventModel getQuestionnaire() { |
128 | return questionnaire; | 134 | return questionnaire; |
129 | } | 135 | } |
136 | + | ||
137 | + public CouponEventModel getCoupon() { | ||
138 | + return coupon; | ||
139 | + } | ||
130 | } | 140 | } | ... | ... |
... | @@ -62,6 +62,7 @@ import java.util.LinkedHashMap; | ... | @@ -62,6 +62,7 @@ import java.util.LinkedHashMap; |
62 | import java.util.Map; | 62 | import java.util.Map; |
63 | 63 | ||
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.QuestionnaireEventModel; | 66 | import ly.warp.sdk.io.models.QuestionnaireEventModel; |
66 | import ly.warp.sdk.utils.WarpUtils; | 67 | import ly.warp.sdk.utils.WarpUtils; |
67 | import ly.warp.sdk.utils.WarplyProperty; | 68 | import ly.warp.sdk.utils.WarplyProperty; |
... | @@ -382,6 +383,10 @@ public class WarpView extends WebView { | ... | @@ -382,6 +383,10 @@ public class WarpView extends WebView { |
382 | questionnaireEvent.setParameter(parts[2]); | 383 | questionnaireEvent.setParameter(parts[2]); |
383 | WarpUtils.setUserTag(Warply.getWarplyContext(), parts[2]); | 384 | WarpUtils.setUserTag(Warply.getWarplyContext(), parts[2]); |
384 | EventBus.getDefault().post(new WarplyEventBusManager(questionnaireEvent)); | 385 | EventBus.getDefault().post(new WarplyEventBusManager(questionnaireEvent)); |
386 | + } else if (parts[1].equals("event:couponRetrieved")) { | ||
387 | + CouponEventModel couponEvent = new CouponEventModel(); | ||
388 | + couponEvent.setSuccess(true); | ||
389 | + EventBus.getDefault().post(new WarplyEventBusManager(couponEvent)); | ||
385 | } | 390 | } |
386 | } | 391 | } |
387 | } | 392 | } | ... | ... |
4.02 KB
16.7 KB
38.7 KB
28.4 KB
15.3 KB
12.5 KB
... | @@ -6,5 +6,5 @@ | ... | @@ -6,5 +6,5 @@ |
6 | android:endColor="@color/cos_skyblue" | 6 | android:endColor="@color/cos_skyblue" |
7 | android:type="linear"/> | 7 | android:type="linear"/> |
8 | <corners | 8 | <corners |
9 | - android:radius="12dp"/> | 9 | + android:radius="7dp"/> |
10 | </shape> | 10 | </shape> |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
... | @@ -34,497 +34,369 @@ | ... | @@ -34,497 +34,369 @@ |
34 | app:layout_constraintTop_toTopOf="parent" /> | 34 | app:layout_constraintTop_toTopOf="parent" /> |
35 | </androidx.constraintlayout.widget.ConstraintLayout> | 35 | </androidx.constraintlayout.widget.ConstraintLayout> |
36 | 36 | ||
37 | - <androidx.constraintlayout.widget.ConstraintLayout | 37 | + <!-- <ScrollView--> |
38 | - android:id="@+id/cl_header" | 38 | + <!-- android:layout_width="match_parent"--> |
39 | + <!-- android:layout_height="match_parent"--> | ||
40 | + <!-- android:layout_below="@+id/cl_header"--> | ||
41 | + <!-- android:fillViewport="true">--> | ||
42 | + | ||
43 | + <!-- <RelativeLayout--> | ||
44 | + <!-- android:layout_width="match_parent"--> | ||
45 | + <!-- android:layout_height="wrap_content"--> | ||
46 | + <!-- android:background="@drawable/shape_cos_loyalty"--> | ||
47 | + <!-- android:orientation="vertical"--> | ||
48 | + <!-- android:paddingBottom="24dp">--> | ||
49 | + | ||
50 | + | ||
51 | + <!-- <ImageView--> | ||
52 | + <!-- android:id="@+id/iv_deals_logo_new"--> | ||
53 | + <!-- android:layout_width="wrap_content"--> | ||
54 | + <!-- android:layout_height="wrap_content"--> | ||
55 | + <!-- android:layout_below="@id/cl_deals_win"--> | ||
56 | + <!-- android:layout_marginStart="12dp"--> | ||
57 | + <!-- android:layout_marginTop="48dp"--> | ||
58 | + <!-- android:src="@drawable/ic_deals_logo_new" />--> | ||
59 | + | ||
60 | + | ||
61 | + <!-- <TextView--> | ||
62 | + <!-- android:id="@+id/tv_mygifts_title"--> | ||
63 | + <!-- android:layout_width="wrap_content"--> | ||
64 | + <!-- android:layout_height="wrap_content"--> | ||
65 | + <!-- android:layout_below="@+id/cl_loyalty_deals"--> | ||
66 | + <!-- android:layout_marginStart="12dp"--> | ||
67 | + <!-- android:layout_marginTop="48dp"--> | ||
68 | + <!-- android:text="@string/cos_mygifts"--> | ||
69 | + <!-- android:textColor="@android:color/white"--> | ||
70 | + <!-- android:textFontWeight="600"--> | ||
71 | + <!-- android:textSize="18sp" />--> | ||
72 | + | ||
73 | + | ||
74 | + <!-- </RelativeLayout>--> | ||
75 | + <!-- </ScrollView>--> | ||
76 | + | ||
77 | + <ScrollView | ||
39 | android:layout_width="match_parent" | 78 | android:layout_width="match_parent" |
40 | - android:layout_height="90dp" | 79 | + android:layout_height="match_parent" |
41 | android:layout_below="@+id/cl_loyalty_wallet_header" | 80 | android:layout_below="@+id/cl_loyalty_wallet_header" |
42 | - android:layout_marginBottom="24dp" | 81 | + android:background="@color/cos_grey5" |
43 | - android:background="@android:color/white" | 82 | + android:fillViewport="true"> |
44 | - android:paddingHorizontal="24dp"> | ||
45 | - | ||
46 | - <de.hdodenhof.circleimageview.CircleImageView | ||
47 | - android:id="@+id/iv_profile_photo" | ||
48 | - android:layout_width="60dp" | ||
49 | - android:layout_height="60dp" | ||
50 | - android:src="@drawable/profile_photo" | ||
51 | - app:layout_constraintBottom_toBottomOf="parent" | ||
52 | - app:layout_constraintLeft_toLeftOf="parent" | ||
53 | - app:layout_constraintTop_toTopOf="parent" /> | ||
54 | 83 | ||
55 | - <LinearLayout | 84 | + <RelativeLayout |
56 | - android:layout_width="wrap_content" | 85 | + android:layout_width="match_parent" |
57 | - android:layout_height="wrap_content" | 86 | + android:layout_height="match_parent"> |
58 | - android:orientation="vertical" | ||
59 | - app:layout_constraintBottom_toBottomOf="@+id/iv_profile_photo" | ||
60 | - app:layout_constraintStart_toEndOf="@+id/iv_profile_photo" | ||
61 | - app:layout_constraintTop_toTopOf="@+id/iv_profile_photo"> | ||
62 | - | ||
63 | - <TextView | ||
64 | - android:id="@+id/tv_name" | ||
65 | - android:layout_width="wrap_content" | ||
66 | - android:layout_height="wrap_content" | ||
67 | - android:layout_marginStart="8dp" | ||
68 | - android:layout_marginBottom="4dp" | ||
69 | - android:maxLines="1" | ||
70 | - android:textColor="@color/grey" | ||
71 | - tools:text="Test Name" /> | ||
72 | 87 | ||
73 | <LinearLayout | 88 | <LinearLayout |
74 | - android:id="@+id/ll_user_badge" | 89 | + android:id="@+id/ll_first_view" |
75 | - android:layout_width="wrap_content" | 90 | + android:layout_width="match_parent" |
76 | android:layout_height="wrap_content" | 91 | android:layout_height="wrap_content" |
77 | - android:layout_marginStart="8dp" | 92 | + android:background="@drawable/ic_background_circle" |
78 | - android:background="@drawable/shape_cos_gradient6" | 93 | + android:gravity="center_horizontal" |
79 | - android:gravity="center" | 94 | + android:orientation="vertical" |
80 | - android:paddingHorizontal="6dp" | 95 | + android:paddingVertical="32dp"> |
81 | - android:paddingVertical="2dp" | 96 | + |
82 | - android:visibility="gone" | 97 | + <de.hdodenhof.circleimageview.CircleImageView |
83 | - tools:visibility="visible"> | 98 | + android:id="@+id/iv_profile_photo" |
99 | + android:layout_width="70dp" | ||
100 | + android:layout_height="70dp" | ||
101 | + android:src="@drawable/profile_photo" | ||
102 | + app:layout_constraintBottom_toBottomOf="parent" | ||
103 | + app:layout_constraintLeft_toLeftOf="parent" | ||
104 | + app:layout_constraintTop_toTopOf="parent" /> | ||
84 | 105 | ||
85 | <TextView | 106 | <TextView |
86 | - android:id="@+id/tv_type" | 107 | + android:id="@+id/tv_name" |
87 | android:layout_width="wrap_content" | 108 | android:layout_width="wrap_content" |
88 | android:layout_height="wrap_content" | 109 | android:layout_height="wrap_content" |
89 | - android:textColor="@android:color/white" | 110 | + android:layout_marginVertical="6dp" |
90 | - android:textFontWeight="600" | 111 | + android:maxLines="1" |
91 | - tools:text="@string/cos_profile_type" /> | 112 | + android:textColor="@color/grey" |
92 | - </LinearLayout> | 113 | + android:textSize="15sp" |
114 | + tools:text="Test Name" /> | ||
93 | 115 | ||
94 | - <LinearLayout | 116 | + <LinearLayout |
95 | - android:id="@+id/ll_user_questionnaire" | 117 | + android:id="@+id/ll_user_badge" |
96 | - android:layout_width="wrap_content" | ||
97 | - android:layout_height="wrap_content" | ||
98 | - android:layout_marginStart="8dp" | ||
99 | - android:background="@drawable/shape_cos_transparent_rounded3" | ||
100 | - android:gravity="center" | ||
101 | - android:paddingHorizontal="8dp" | ||
102 | - android:paddingVertical="4dp" | ||
103 | - android:visibility="gone"> | ||
104 | - | ||
105 | - <TextView | ||
106 | - android:id="@+id/tv_questionnaire" | ||
107 | android:layout_width="wrap_content" | 118 | android:layout_width="wrap_content" |
108 | android:layout_height="wrap_content" | 119 | android:layout_height="wrap_content" |
109 | - android:text="@string/cos_profile_questionnaire" | 120 | + android:background="@drawable/shape_cos_gradient6" |
110 | - android:textColor="@color/cos_dark_blue" | 121 | + android:gravity="center" |
111 | - android:textFontWeight="600" /> | 122 | + android:paddingHorizontal="10dp" |
112 | - </LinearLayout> | 123 | + android:paddingVertical="3dp" |
113 | - </LinearLayout> | 124 | + android:visibility="gone" |
114 | - </androidx.constraintlayout.widget.ConstraintLayout> | 125 | + tools:visibility="visible"> |
115 | 126 | ||
116 | - <ScrollView | 127 | + <TextView |
117 | - android:layout_width="match_parent" | 128 | + android:id="@+id/tv_type" |
118 | - android:layout_height="match_parent" | 129 | + android:layout_width="wrap_content" |
119 | - android:layout_below="@+id/cl_header" | 130 | + android:layout_height="wrap_content" |
120 | - android:fillViewport="true"> | 131 | + android:textColor="@android:color/white" |
132 | + android:textFontWeight="600" | ||
133 | + tools:text="@string/cos_profile_type" /> | ||
134 | + </LinearLayout> | ||
121 | 135 | ||
122 | - <RelativeLayout | 136 | + <LinearLayout |
123 | - android:layout_width="match_parent" | 137 | + android:id="@+id/ll_user_questionnaire" |
124 | - android:layout_height="wrap_content" | 138 | + android:layout_width="wrap_content" |
125 | - android:background="@drawable/shape_cos_loyalty" | 139 | + android:layout_height="wrap_content" |
126 | - android:orientation="vertical" | 140 | + android:gravity="center" |
127 | - android:paddingBottom="24dp"> | 141 | + android:paddingHorizontal="8dp" |
142 | + android:paddingVertical="4dp" | ||
143 | + android:visibility="gone"> | ||
128 | 144 | ||
129 | - <androidx.constraintlayout.widget.ConstraintLayout | 145 | + <TextView |
130 | - android:id="@+id/cl_deals_win" | 146 | + android:id="@+id/tv_questionnaire" |
131 | - android:layout_width="match_parent" | 147 | + android:layout_width="wrap_content" |
132 | - android:layout_height="wrap_content" | 148 | + android:layout_height="wrap_content" |
133 | - android:layout_marginHorizontal="8dp" | 149 | + android:text="@string/cos_profile_questionnaire" |
134 | - android:layout_marginTop="32dp"> | 150 | + android:textColor="@color/cos_dark_blue" |
151 | + android:textFontWeight="600" /> | ||
152 | + </LinearLayout> | ||
153 | + </LinearLayout> | ||
135 | 154 | ||
136 | - <androidx.constraintlayout.widget.Guideline | 155 | + <LinearLayout |
137 | - android:id="@+id/gl_vertical_06" | 156 | + android:id="@+id/ll_second_view" |
138 | - android:layout_width="wrap_content" | 157 | + android:layout_width="match_parent" |
139 | - android:layout_height="match_parent" | 158 | + android:layout_height="match_parent" |
140 | - android:orientation="vertical" | 159 | + android:layout_below="@+id/ll_first_view" |
141 | - app:layout_constraintGuide_percent="0.074" /> | 160 | + android:gravity="center_horizontal" |
161 | + android:orientation="vertical"> | ||
142 | 162 | ||
143 | <androidx.constraintlayout.widget.ConstraintLayout | 163 | <androidx.constraintlayout.widget.ConstraintLayout |
144 | - android:id="@+id/cl_deals_win_inner" | 164 | + android:id="@+id/cl_deals_cos" |
145 | - android:layout_width="0dp" | 165 | + android:layout_width="match_parent" |
146 | - android:layout_height="0dp" | 166 | + android:layout_height="wrap_content" |
147 | - android:background="@drawable/shape_cos_grey4" | 167 | + android:layout_marginHorizontal="8dp" |
148 | - app:layout_constraintBottom_toBottomOf="parent" | 168 | + android:layout_marginTop="32dp"> |
149 | - app:layout_constraintEnd_toEndOf="parent" | ||
150 | - app:layout_constraintStart_toEndOf="@+id/gl_vertical_06" | ||
151 | - app:layout_constraintTop_toTopOf="parent"> | ||
152 | 169 | ||
153 | <androidx.constraintlayout.widget.Guideline | 170 | <androidx.constraintlayout.widget.Guideline |
154 | - android:id="@+id/gl_vertical_16" | 171 | + android:id="@+id/gl_vertical_06_cos" |
155 | android:layout_width="wrap_content" | 172 | android:layout_width="wrap_content" |
156 | android:layout_height="match_parent" | 173 | android:layout_height="match_parent" |
157 | android:orientation="vertical" | 174 | android:orientation="vertical" |
158 | - app:layout_constraintGuide_percent="0.16" /> | 175 | + app:layout_constraintGuide_percent="0.09" /> |
159 | 176 | ||
160 | - <TextView | 177 | + <androidx.constraintlayout.widget.Guideline |
178 | + android:id="@+id/gl_horizontal_50_cos" | ||
179 | + android:layout_width="wrap_content" | ||
180 | + android:layout_height="match_parent" | ||
181 | + android:orientation="horizontal" | ||
182 | + app:layout_constraintGuide_percent="0.56" /> | ||
183 | + | ||
184 | + <androidx.constraintlayout.widget.ConstraintLayout | ||
185 | + android:id="@+id/cl_deals_win_inner_cos" | ||
161 | android:layout_width="0dp" | 186 | android:layout_width="0dp" |
162 | - android:layout_height="wrap_content" | 187 | + android:layout_height="0dp" |
163 | - android:layout_marginEnd="16dp" | 188 | + android:background="@drawable/shape_cos_grey4" |
164 | - android:text="@string/cos_deals_win_title" | ||
165 | - android:textColor="@android:color/white" | ||
166 | - android:textSize="15sp" | ||
167 | app:layout_constraintBottom_toBottomOf="parent" | 189 | app:layout_constraintBottom_toBottomOf="parent" |
168 | app:layout_constraintEnd_toEndOf="parent" | 190 | app:layout_constraintEnd_toEndOf="parent" |
169 | - app:layout_constraintStart_toStartOf="@+id/gl_vertical_16" | 191 | + app:layout_constraintStart_toEndOf="@+id/gl_vertical_06_cos" |
192 | + app:layout_constraintTop_toTopOf="parent"> | ||
193 | + | ||
194 | + <androidx.constraintlayout.widget.Guideline | ||
195 | + android:id="@+id/gl_vertical_16_cos" | ||
196 | + android:layout_width="wrap_content" | ||
197 | + android:layout_height="match_parent" | ||
198 | + android:orientation="vertical" | ||
199 | + app:layout_constraintGuide_percent="0.16" /> | ||
200 | + | ||
201 | + <TextView | ||
202 | + android:id="@+id/tv_deals_value_all" | ||
203 | + android:layout_width="0dp" | ||
204 | + android:layout_height="wrap_content" | ||
205 | + android:layout_marginEnd="16dp" | ||
206 | + android:text="@string/cos_deals_win_title_cos" | ||
207 | + android:textColor="@android:color/white" | ||
208 | + android:textSize="16sp" | ||
209 | + app:layout_constraintBottom_toBottomOf="parent" | ||
210 | + app:layout_constraintEnd_toEndOf="parent" | ||
211 | + app:layout_constraintStart_toStartOf="@+id/gl_vertical_16_cos" | ||
212 | + app:layout_constraintTop_toTopOf="parent" /> | ||
213 | + </androidx.constraintlayout.widget.ConstraintLayout> | ||
214 | + | ||
215 | + <ImageView | ||
216 | + android:id="@+id/iv_deals_logo" | ||
217 | + android:layout_width="80dp" | ||
218 | + android:layout_height="80dp" | ||
219 | + android:layout_marginVertical="4dp" | ||
220 | + android:src="@drawable/ic_deals_polygon" | ||
221 | + app:layout_constraintBottom_toBottomOf="parent" | ||
222 | + app:layout_constraintEnd_toEndOf="@+id/gl_vertical_06_cos" | ||
223 | + app:layout_constraintStart_toStartOf="@+id/gl_vertical_06_cos" | ||
170 | app:layout_constraintTop_toTopOf="parent" /> | 224 | app:layout_constraintTop_toTopOf="parent" /> |
171 | - </androidx.constraintlayout.widget.ConstraintLayout> | ||
172 | - | ||
173 | - <ImageView | ||
174 | - android:layout_width="60dp" | ||
175 | - android:layout_height="60dp" | ||
176 | - android:layout_marginVertical="4dp" | ||
177 | - android:src="@drawable/ic_hands" | ||
178 | - app:layout_constraintBottom_toBottomOf="parent" | ||
179 | - app:layout_constraintEnd_toEndOf="@+id/gl_vertical_06" | ||
180 | - app:layout_constraintStart_toStartOf="@+id/gl_vertical_06" | ||
181 | - app:layout_constraintTop_toTopOf="parent" /> | ||
182 | - | ||
183 | - </androidx.constraintlayout.widget.ConstraintLayout> | ||
184 | 225 | ||
185 | - <ImageView | 226 | + <TextView |
186 | - android:id="@+id/iv_deals_logo_new" | 227 | + android:id="@+id/tv_deals_value" |
187 | - android:layout_width="wrap_content" | 228 | + android:layout_width="wrap_content" |
188 | - android:layout_height="wrap_content" | 229 | + android:layout_height="wrap_content" |
189 | - android:layout_below="@id/cl_deals_win" | 230 | + android:textColor="@color/cos_grey" |
190 | - android:layout_marginStart="12dp" | 231 | + android:textSize="12sp" |
191 | - android:layout_marginTop="48dp" | 232 | + android:textStyle="bold" |
192 | - android:src="@drawable/ic_deals_logo_new" /> | 233 | + app:layout_constraintEnd_toEndOf="@+id/iv_deals_logo" |
234 | + app:layout_constraintStart_toStartOf="@+id/iv_deals_logo" | ||
235 | + app:layout_constraintTop_toBottomOf="@+id/gl_horizontal_50_cos" | ||
236 | + tools:text="18.00€" /> | ||
193 | 237 | ||
194 | - <androidx.constraintlayout.widget.ConstraintLayout | 238 | + </androidx.constraintlayout.widget.ConstraintLayout> |
195 | - android:id="@+id/cl_loyalty_deals" | ||
196 | - android:layout_width="match_parent" | ||
197 | - android:layout_height="wrap_content" | ||
198 | - android:layout_below="@+id/iv_deals_logo_new" | ||
199 | - android:layout_marginHorizontal="6dp" | ||
200 | - android:layout_marginTop="12dp" | ||
201 | - android:background="@drawable/shape_cos_white2" | ||
202 | - android:paddingVertical="10dp"> | ||
203 | 239 | ||
204 | - <LinearLayout | 240 | + <androidx.constraintlayout.widget.ConstraintLayout |
205 | - android:layout_width="wrap_content" | 241 | + android:id="@+id/cl_deals_win" |
242 | + android:layout_width="match_parent" | ||
206 | android:layout_height="wrap_content" | 243 | android:layout_height="wrap_content" |
207 | - android:layout_marginStart="24dp" | 244 | + android:layout_marginHorizontal="8dp" |
208 | - android:orientation="vertical" | 245 | + android:layout_marginTop="32dp"> |
209 | - app:layout_constraintBottom_toBottomOf="parent" | ||
210 | - app:layout_constraintStart_toStartOf="parent" | ||
211 | - app:layout_constraintTop_toTopOf="parent"> | ||
212 | 246 | ||
213 | - <TextView | 247 | + <androidx.constraintlayout.widget.Guideline |
214 | - android:id="@+id/tv_active_deals" | 248 | + android:id="@+id/gl_vertical_06" |
215 | android:layout_width="wrap_content" | 249 | android:layout_width="wrap_content" |
216 | - android:layout_height="wrap_content" | 250 | + android:layout_height="match_parent" |
217 | - android:text="@string/cos_active_deals" | 251 | + android:orientation="vertical" |
218 | - android:textColor="@color/blue_dark" | 252 | + app:layout_constraintGuide_percent="0.09" /> |
219 | - android:textFontWeight="600" | ||
220 | - android:textSize="18sp" /> | ||
221 | 253 | ||
222 | - <TextView | 254 | + <androidx.constraintlayout.widget.Guideline |
223 | - android:id="@+id/tv_active_deals_code" | 255 | + android:id="@+id/gl_horizontal_50" |
224 | android:layout_width="wrap_content" | 256 | android:layout_width="wrap_content" |
225 | - android:layout_height="wrap_content" | 257 | + android:layout_height="match_parent" |
226 | - android:text="961544809" | 258 | + android:orientation="horizontal" |
227 | - android:textColor="@color/blue_dark" | 259 | + app:layout_constraintGuide_percent="0.56" /> |
228 | - android:textSize="18sp" | 260 | + |
229 | - android:textStyle="bold" /> | 261 | + <androidx.constraintlayout.widget.ConstraintLayout |
262 | + android:id="@+id/cl_deals_win_inner" | ||
263 | + android:layout_width="0dp" | ||
264 | + android:layout_height="0dp" | ||
265 | + android:background="@drawable/shape_cos_grey4" | ||
266 | + app:layout_constraintBottom_toBottomOf="parent" | ||
267 | + app:layout_constraintEnd_toEndOf="parent" | ||
268 | + app:layout_constraintStart_toEndOf="@+id/gl_vertical_06" | ||
269 | + app:layout_constraintTop_toTopOf="parent"> | ||
270 | + | ||
271 | + <androidx.constraintlayout.widget.Guideline | ||
272 | + android:id="@+id/gl_vertical_16" | ||
273 | + android:layout_width="wrap_content" | ||
274 | + android:layout_height="match_parent" | ||
275 | + android:orientation="vertical" | ||
276 | + app:layout_constraintGuide_percent="0.16" /> | ||
277 | + | ||
278 | + <TextView | ||
279 | + android:id="@+id/tv_gifts_value_all" | ||
280 | + android:layout_width="0dp" | ||
281 | + android:layout_height="wrap_content" | ||
282 | + android:layout_marginEnd="16dp" | ||
283 | + android:text="@string/cos_deals_win_title" | ||
284 | + android:textColor="@android:color/white" | ||
285 | + android:textSize="16sp" | ||
286 | + app:layout_constraintBottom_toBottomOf="parent" | ||
287 | + app:layout_constraintEnd_toEndOf="parent" | ||
288 | + app:layout_constraintStart_toStartOf="@+id/gl_vertical_16" | ||
289 | + app:layout_constraintTop_toTopOf="parent" /> | ||
290 | + </androidx.constraintlayout.widget.ConstraintLayout> | ||
291 | + | ||
292 | + <ImageView | ||
293 | + android:id="@+id/iv_gifts_logo" | ||
294 | + android:layout_width="80dp" | ||
295 | + android:layout_height="80dp" | ||
296 | + android:layout_marginVertical="4dp" | ||
297 | + android:src="@drawable/ic_gifts_polygon" | ||
298 | + app:layout_constraintBottom_toBottomOf="parent" | ||
299 | + app:layout_constraintEnd_toEndOf="@+id/gl_vertical_06" | ||
300 | + app:layout_constraintStart_toStartOf="@+id/gl_vertical_06" | ||
301 | + app:layout_constraintTop_toTopOf="parent" /> | ||
230 | 302 | ||
231 | <TextView | 303 | <TextView |
304 | + android:id="@+id/tv_gifts_value" | ||
232 | android:layout_width="wrap_content" | 305 | android:layout_width="wrap_content" |
233 | android:layout_height="wrap_content" | 306 | android:layout_height="wrap_content" |
234 | - android:text="Λήγει σε 4 ημέρες" | 307 | + android:textColor="@color/cos_grey" |
235 | - android:textColor="@color/blue_dark" | 308 | + android:textSize="12sp" |
236 | - android:textFontWeight="600" /> | 309 | + android:textStyle="bold" |
237 | - </LinearLayout> | 310 | + app:layout_constraintEnd_toEndOf="@+id/iv_gifts_logo" |
311 | + app:layout_constraintStart_toStartOf="@+id/iv_gifts_logo" | ||
312 | + app:layout_constraintTop_toBottomOf="@+id/gl_horizontal_50" | ||
313 | + tools:text="20.00€" /> | ||
238 | 314 | ||
239 | - <ImageView | 315 | + </androidx.constraintlayout.widget.ConstraintLayout> |
240 | - android:layout_width="90dp" | ||
241 | - android:layout_height="90dp" | ||
242 | - android:layout_marginEnd="32dp" | ||
243 | - android:src="@drawable/ic_deals_green" | ||
244 | - app:layout_constraintBottom_toBottomOf="parent" | ||
245 | - app:layout_constraintEnd_toEndOf="parent" | ||
246 | - app:layout_constraintTop_toTopOf="parent" /> | ||
247 | - </androidx.constraintlayout.widget.ConstraintLayout> | ||
248 | 316 | ||
249 | - <TextView | 317 | + <ImageView |
250 | - android:id="@+id/tv_mygifts_title" | 318 | + android:layout_width="110dp" |
251 | - android:layout_width="wrap_content" | 319 | + android:layout_height="40dp" |
252 | - android:layout_height="wrap_content" | 320 | + android:layout_gravity="start" |
253 | - android:layout_below="@+id/cl_loyalty_deals" | 321 | + android:layout_marginHorizontal="16dp" |
254 | - android:layout_marginStart="12dp" | 322 | + android:layout_marginTop="48dp" |
255 | - android:layout_marginTop="48dp" | 323 | + android:src="@drawable/ic_deals_horizontal" /> |
256 | - android:text="@string/cos_mygifts" | ||
257 | - android:textColor="@android:color/white" | ||
258 | - android:textFontWeight="600" | ||
259 | - android:textSize="18sp" /> | ||
260 | - | ||
261 | - <androidx.constraintlayout.widget.ConstraintLayout | ||
262 | - android:id="@+id/cl_mygifts" | ||
263 | - android:layout_width="match_parent" | ||
264 | - android:layout_height="wrap_content" | ||
265 | - android:layout_below="@+id/tv_mygifts_title" | ||
266 | - android:layout_marginHorizontal="6dp" | ||
267 | - android:layout_marginTop="12dp" | ||
268 | - android:background="@drawable/shape_cos_white2" | ||
269 | - android:paddingVertical="10dp"> | ||
270 | 324 | ||
271 | - <LinearLayout | 325 | + <androidx.constraintlayout.widget.ConstraintLayout |
272 | - android:layout_width="wrap_content" | 326 | + android:id="@+id/cl_mygifts" |
327 | + android:layout_width="match_parent" | ||
273 | android:layout_height="wrap_content" | 328 | android:layout_height="wrap_content" |
274 | - android:layout_marginStart="24dp" | 329 | + android:layout_below="@+id/tv_mygifts_title" |
275 | - android:orientation="vertical" | 330 | + android:layout_marginHorizontal="8dp" |
276 | - app:layout_constraintBottom_toBottomOf="parent" | 331 | + android:layout_marginTop="12dp" |
277 | - app:layout_constraintStart_toStartOf="parent" | 332 | + android:background="@drawable/shape_cos_white2" |
278 | - app:layout_constraintTop_toTopOf="parent"> | 333 | + android:paddingVertical="10dp"> |
279 | - | ||
280 | - <TextView | ||
281 | - android:id="@+id/tv_active_gifts" | ||
282 | - android:layout_width="wrap_content" | ||
283 | - android:layout_height="wrap_content" | ||
284 | - android:text="@string/cos_gifts_banner_title" | ||
285 | - android:textColor="@color/blue_dark" | ||
286 | - android:textFontWeight="600" | ||
287 | - android:textSize="18sp" /> | ||
288 | 334 | ||
289 | - <TextView | 335 | + <LinearLayout |
290 | - android:id="@+id/tv_active_deals_text" | ||
291 | android:layout_width="wrap_content" | 336 | android:layout_width="wrap_content" |
292 | android:layout_height="wrap_content" | 337 | android:layout_height="wrap_content" |
293 | - android:text="@string/cos_active_rewards" | 338 | + android:layout_marginStart="24dp" |
294 | - android:textColor="@color/blue_dark" | 339 | + android:orientation="vertical" |
295 | - android:textSize="18sp" | 340 | + app:layout_constraintBottom_toBottomOf="parent" |
296 | - android:textStyle="bold" /> | 341 | + app:layout_constraintStart_toStartOf="parent" |
342 | + app:layout_constraintTop_toTopOf="parent"> | ||
343 | + | ||
344 | + <TextView | ||
345 | + android:id="@+id/tv_active_gifts" | ||
346 | + android:layout_width="wrap_content" | ||
347 | + android:layout_height="wrap_content" | ||
348 | + android:text="@string/cos_active_deals" | ||
349 | + android:textColor="@color/blue_dark" | ||
350 | + android:textFontWeight="600" | ||
351 | + android:textSize="18sp" /> | ||
352 | + | ||
353 | + <TextView | ||
354 | + android:id="@+id/tv_active_deals_text" | ||
355 | + android:layout_width="wrap_content" | ||
356 | + android:layout_height="wrap_content" | ||
357 | + android:textColor="@color/blue_dark" | ||
358 | + android:textSize="18sp" | ||
359 | + android:textStyle="bold" | ||
360 | + tools:text="961544809" /> | ||
361 | + | ||
362 | + <TextView | ||
363 | + android:id="@+id/tv_active_deals_date_text" | ||
364 | + android:layout_width="wrap_content" | ||
365 | + android:layout_height="wrap_content" | ||
366 | + tools:text="@string/cos_active_coupon_date" | ||
367 | + android:textColor="@color/blue_dark" /> | ||
368 | + </LinearLayout> | ||
369 | + | ||
370 | + <ImageView | ||
371 | + android:layout_width="86dp" | ||
372 | + android:layout_height="86dp" | ||
373 | + android:layout_marginVertical="4dp" | ||
374 | + android:layout_marginEnd="32dp" | ||
375 | + android:src="@drawable/ic_deals_circle" | ||
376 | + app:layout_constraintBottom_toBottomOf="parent" | ||
377 | + app:layout_constraintEnd_toEndOf="parent" | ||
378 | + app:layout_constraintTop_toTopOf="parent" /> | ||
379 | + </androidx.constraintlayout.widget.ConstraintLayout> | ||
297 | 380 | ||
298 | - <TextView | 381 | + <TextView |
299 | - android:layout_width="wrap_content" | 382 | + android:layout_width="wrap_content" |
300 | - android:layout_height="wrap_content" | 383 | + android:layout_height="wrap_content" |
301 | - android:text="@string/cos_see_more" | 384 | + android:layout_gravity="start" |
302 | - android:textColor="@color/blue_dark" /> | 385 | + android:layout_marginHorizontal="16dp" |
303 | - </LinearLayout> | 386 | + android:layout_marginTop="48dp" |
387 | + android:layout_marginBottom="10dp" | ||
388 | + android:text="@string/cos_mygifts" | ||
389 | + android:textColor="@android:color/white" | ||
390 | + android:textSize="20sp" | ||
391 | + android:textStyle="bold" /> | ||
304 | 392 | ||
305 | - <!-- <ImageView--> | 393 | + <androidx.recyclerview.widget.RecyclerView |
306 | - <!-- android:layout_width="90dp"--> | 394 | + android:id="@+id/rv_active_coupons" |
307 | - <!-- android:layout_height="90dp"--> | 395 | + android:layout_width="match_parent" |
308 | - <!-- android:layout_marginEnd="32dp"--> | 396 | + android:layout_height="wrap_content" |
309 | - <!-- android:src="@drawable/ic_deals_green"--> | 397 | + android:layout_marginHorizontal="2dp" |
310 | - <!-- app:layout_constraintBottom_toBottomOf="parent"--> | 398 | + android:paddingBottom="40dp" /> |
311 | - <!-- app:layout_constraintEnd_toEndOf="parent"--> | 399 | + </LinearLayout> |
312 | - <!-- app:layout_constraintTop_toTopOf="parent" />--> | ||
313 | - </androidx.constraintlayout.widget.ConstraintLayout> | ||
314 | - | ||
315 | - <!-- <androidx.constraintlayout.widget.ConstraintLayout--> | ||
316 | - <!-- android:id="@+id/cl_active_coupons"--> | ||
317 | - <!-- android:layout_width="match_parent"--> | ||
318 | - <!-- android:layout_height="wrap_content"--> | ||
319 | - <!-- android:layout_below="@+id/cl_loyalty_deals"--> | ||
320 | - <!-- android:layout_marginTop="64dp"--> | ||
321 | - <!-- android:paddingBottom="4dp">--> | ||
322 | - | ||
323 | - <!-- <TextView--> | ||
324 | - <!-- android:id="@+id/tv_coupons_title"--> | ||
325 | - <!-- android:layout_width="wrap_content"--> | ||
326 | - <!-- android:layout_height="wrap_content"--> | ||
327 | - <!-- android:layout_marginStart="10dp"--> | ||
328 | - <!-- android:text="@string/cos_loyalty_coupons"--> | ||
329 | - <!-- android:textColor="@android:color/white"--> | ||
330 | - <!-- android:textSize="18sp"--> | ||
331 | - <!-- android:textStyle="bold"--> | ||
332 | - <!-- app:layout_constraintStart_toStartOf="parent"--> | ||
333 | - <!-- app:layout_constraintTop_toTopOf="parent" />--> | ||
334 | - | ||
335 | - <!-- <LinearLayout--> | ||
336 | - <!-- android:id="@+id/ll_old_coupons"--> | ||
337 | - <!-- android:layout_width="wrap_content"--> | ||
338 | - <!-- android:layout_height="wrap_content"--> | ||
339 | - <!-- android:gravity="center"--> | ||
340 | - <!-- android:orientation="horizontal"--> | ||
341 | - <!-- app:layout_constraintBottom_toBottomOf="@+id/tv_coupons_title"--> | ||
342 | - <!-- app:layout_constraintEnd_toEndOf="parent"--> | ||
343 | - <!-- app:layout_constraintTop_toTopOf="@+id/tv_coupons_title">--> | ||
344 | - | ||
345 | - <!-- <TextView--> | ||
346 | - <!-- android:layout_width="wrap_content"--> | ||
347 | - <!-- android:layout_height="wrap_content"--> | ||
348 | - <!-- android:layout_marginEnd="8dp"--> | ||
349 | - <!-- android:text="@string/cos_loyalty_old_coupons"--> | ||
350 | - <!-- android:textColor="@color/white_tr4"--> | ||
351 | - <!-- android:textFontWeight="600"--> | ||
352 | - <!-- android:textSize="16sp" />--> | ||
353 | - | ||
354 | - <!-- <ImageView--> | ||
355 | - <!-- android:id="@+id/iv_more"--> | ||
356 | - <!-- android:layout_width="20dp"--> | ||
357 | - <!-- android:layout_height="20dp"--> | ||
358 | - <!-- android:layout_marginEnd="24dp"--> | ||
359 | - <!-- android:src="@drawable/ic_arrow_right_white" />--> | ||
360 | - <!-- </LinearLayout>--> | ||
361 | - | ||
362 | - <!-- <androidx.constraintlayout.widget.ConstraintLayout--> | ||
363 | - <!-- android:id="@+id/cl_loyalty_coupon"--> | ||
364 | - <!-- android:layout_width="match_parent"--> | ||
365 | - <!-- android:layout_height="140dp"--> | ||
366 | - <!-- android:layout_marginTop="16dp"--> | ||
367 | - <!-- android:background="@drawable/ic_coupon_background"--> | ||
368 | - <!-- app:layout_constraintEnd_toEndOf="parent"--> | ||
369 | - <!-- app:layout_constraintStart_toStartOf="parent"--> | ||
370 | - <!-- app:layout_constraintTop_toBottomOf="@+id/tv_coupons_title">--> | ||
371 | - | ||
372 | - <!-- <LinearLayout--> | ||
373 | - <!-- android:layout_width="wrap_content"--> | ||
374 | - <!-- android:layout_height="wrap_content"--> | ||
375 | - <!-- android:layout_marginStart="40dp"--> | ||
376 | - <!-- android:orientation="vertical"--> | ||
377 | - <!-- app:layout_constraintBottom_toBottomOf="parent"--> | ||
378 | - <!-- app:layout_constraintStart_toStartOf="parent"--> | ||
379 | - <!-- app:layout_constraintTop_toTopOf="parent">--> | ||
380 | - | ||
381 | - <!-- <TextView--> | ||
382 | - <!-- android:id="@+id/tv_active_coupons"--> | ||
383 | - <!-- android:layout_width="wrap_content"--> | ||
384 | - <!-- android:layout_height="wrap_content"--> | ||
385 | - <!-- android:layout_marginBottom="8dp"--> | ||
386 | - <!-- android:textColor="@color/blue_dark"--> | ||
387 | - <!-- android:textFontWeight="600"--> | ||
388 | - <!-- android:textSize="18sp"--> | ||
389 | - <!-- tools:text="@string/cos_active_coupons" />--> | ||
390 | - | ||
391 | - <!-- <TextView--> | ||
392 | - <!-- android:layout_width="wrap_content"--> | ||
393 | - <!-- android:layout_height="wrap_content"--> | ||
394 | - <!-- android:layout_marginTop="8dp"--> | ||
395 | - <!-- android:text="@string/cos_see_all"--> | ||
396 | - <!-- android:textColor="@color/blue_dark" />--> | ||
397 | - <!-- </LinearLayout>--> | ||
398 | - | ||
399 | - <!-- <ImageView--> | ||
400 | - <!-- android:layout_width="90dp"--> | ||
401 | - <!-- android:layout_height="90dp"--> | ||
402 | - <!-- android:layout_marginEnd="32dp"--> | ||
403 | - <!-- android:src="@drawable/ic_gifts_for_you"--> | ||
404 | - <!-- app:layout_constraintBottom_toBottomOf="parent"--> | ||
405 | - <!-- app:layout_constraintEnd_toEndOf="parent"--> | ||
406 | - <!-- app:layout_constraintTop_toTopOf="parent" />--> | ||
407 | - <!-- </androidx.constraintlayout.widget.ConstraintLayout>--> | ||
408 | - <!-- </androidx.constraintlayout.widget.ConstraintLayout>--> | ||
409 | - | ||
410 | - <!-- <androidx.constraintlayout.widget.ConstraintLayout--> | ||
411 | - <!-- android:id="@+id/cl_cl_active_rewards"--> | ||
412 | - <!-- android:layout_width="match_parent"--> | ||
413 | - <!-- android:layout_height="wrap_content"--> | ||
414 | - <!-- android:layout_below="@+id/cl_active_coupons"--> | ||
415 | - <!-- android:layout_marginTop="64dp"--> | ||
416 | - <!-- android:paddingBottom="4dp">--> | ||
417 | - | ||
418 | - <!-- <TextView--> | ||
419 | - <!-- android:id="@+id/tv_rewards_title"--> | ||
420 | - <!-- android:layout_width="wrap_content"--> | ||
421 | - <!-- android:layout_height="wrap_content"--> | ||
422 | - <!-- android:layout_marginStart="10dp"--> | ||
423 | - <!-- android:text="@string/cos_loyalty_rewards"--> | ||
424 | - <!-- android:textColor="@android:color/white"--> | ||
425 | - <!-- android:textSize="18sp"--> | ||
426 | - <!-- android:textStyle="bold"--> | ||
427 | - <!-- app:layout_constraintStart_toStartOf="parent"--> | ||
428 | - <!-- app:layout_constraintTop_toTopOf="parent" />--> | ||
429 | - | ||
430 | - <!-- <LinearLayout--> | ||
431 | - <!-- android:id="@+id/ll_old_rewards"--> | ||
432 | - <!-- android:layout_width="wrap_content"--> | ||
433 | - <!-- android:layout_height="wrap_content"--> | ||
434 | - <!-- android:gravity="center"--> | ||
435 | - <!-- android:orientation="horizontal"--> | ||
436 | - <!-- app:layout_constraintBottom_toBottomOf="@+id/tv_rewards_title"--> | ||
437 | - <!-- app:layout_constraintEnd_toEndOf="parent"--> | ||
438 | - <!-- app:layout_constraintTop_toTopOf="@+id/tv_rewards_title">--> | ||
439 | - | ||
440 | - <!-- <TextView--> | ||
441 | - <!-- android:layout_width="wrap_content"--> | ||
442 | - <!-- android:layout_height="wrap_content"--> | ||
443 | - <!-- android:layout_marginEnd="8dp"--> | ||
444 | - <!-- android:text="@string/cos_loyalty_old_rewards"--> | ||
445 | - <!-- android:textColor="@color/white_tr4"--> | ||
446 | - <!-- android:textFontWeight="600"--> | ||
447 | - <!-- android:textSize="16sp" />--> | ||
448 | - | ||
449 | - <!-- <ImageView--> | ||
450 | - <!-- android:id="@+id/iv_more2"--> | ||
451 | - <!-- android:layout_width="20dp"--> | ||
452 | - <!-- android:layout_height="20dp"--> | ||
453 | - <!-- android:layout_marginEnd="24dp"--> | ||
454 | - <!-- android:src="@drawable/ic_arrow_right_white" />--> | ||
455 | - <!-- </LinearLayout>--> | ||
456 | - | ||
457 | - <!-- <androidx.constraintlayout.widget.ConstraintLayout--> | ||
458 | - <!-- android:id="@+id/cl_loyalty_rewards"--> | ||
459 | - <!-- android:layout_width="match_parent"--> | ||
460 | - <!-- android:layout_height="160dp"--> | ||
461 | - <!-- android:layout_marginHorizontal="6dp"--> | ||
462 | - <!-- android:layout_marginTop="16dp"--> | ||
463 | - <!-- android:background="@drawable/shape_cos_white2"--> | ||
464 | - <!-- app:layout_constraintEnd_toEndOf="parent"--> | ||
465 | - <!-- app:layout_constraintStart_toStartOf="parent"--> | ||
466 | - <!-- app:layout_constraintTop_toBottomOf="@+id/tv_rewards_title">--> | ||
467 | - | ||
468 | - <!-- <LinearLayout--> | ||
469 | - <!-- android:layout_width="wrap_content"--> | ||
470 | - <!-- android:layout_height="wrap_content"--> | ||
471 | - <!-- android:layout_marginStart="38dp"--> | ||
472 | - <!-- android:orientation="vertical"--> | ||
473 | - <!-- app:layout_constraintBottom_toBottomOf="parent"--> | ||
474 | - <!-- app:layout_constraintStart_toStartOf="parent"--> | ||
475 | - <!-- app:layout_constraintTop_toTopOf="parent">--> | ||
476 | - | ||
477 | - <!-- <TextView--> | ||
478 | - <!-- android:id="@+id/tv_active_rewards"--> | ||
479 | - <!-- android:layout_width="wrap_content"--> | ||
480 | - <!-- android:layout_height="wrap_content"--> | ||
481 | - <!-- android:layout_marginBottom="8dp"--> | ||
482 | - <!-- android:textColor="@color/blue_dark"--> | ||
483 | - <!-- android:textFontWeight="600"--> | ||
484 | - <!-- android:textSize="18sp"--> | ||
485 | - <!-- tools:text="@string/cos_active_rewards" />--> | ||
486 | - | ||
487 | - <!-- <TextView--> | ||
488 | - <!-- android:layout_width="wrap_content"--> | ||
489 | - <!-- android:layout_height="wrap_content"--> | ||
490 | - <!-- android:layout_marginTop="8dp"--> | ||
491 | - <!-- android:text="@string/cos_see_all"--> | ||
492 | - <!-- android:textColor="@color/blue_dark" />--> | ||
493 | - <!-- </LinearLayout>--> | ||
494 | - | ||
495 | - <!-- <ImageView--> | ||
496 | - <!-- android:layout_width="90dp"--> | ||
497 | - <!-- android:layout_height="90dp"--> | ||
498 | - <!-- android:layout_marginEnd="32dp"--> | ||
499 | - <!-- android:src="@drawable/ic_loyalty_rewards"--> | ||
500 | - <!-- app:layout_constraintBottom_toBottomOf="parent"--> | ||
501 | - <!-- app:layout_constraintEnd_toEndOf="parent"--> | ||
502 | - <!-- app:layout_constraintTop_toTopOf="parent" />--> | ||
503 | - <!-- </androidx.constraintlayout.widget.ConstraintLayout>--> | ||
504 | - <!-- </androidx.constraintlayout.widget.ConstraintLayout>--> | ||
505 | - | ||
506 | - <!-- <LinearLayout--> | ||
507 | - <!-- android:id="@+id/ll_analysis"--> | ||
508 | - <!-- android:layout_width="match_parent"--> | ||
509 | - <!-- android:layout_height="50dp"--> | ||
510 | - <!-- android:layout_below="@+id/cl_cl_active_rewards"--> | ||
511 | - <!-- android:layout_marginHorizontal="32dp"--> | ||
512 | - <!-- android:layout_marginTop="64dp"--> | ||
513 | - <!-- android:layout_marginBottom="32dp"--> | ||
514 | - <!-- android:background="@drawable/selector_button_grey"--> | ||
515 | - <!-- android:gravity="center"--> | ||
516 | - <!-- android:orientation="horizontal"--> | ||
517 | - <!-- android:visibility="gone">--> | ||
518 | - | ||
519 | - <!-- <TextView--> | ||
520 | - <!-- android:layout_width="wrap_content"--> | ||
521 | - <!-- android:layout_height="wrap_content"--> | ||
522 | - <!-- android:gravity="center"--> | ||
523 | - <!-- android:text="@string/cos_analysis"--> | ||
524 | - <!-- android:textColor="@color/cos_green6"--> | ||
525 | - <!-- android:textSize="17dp"--> | ||
526 | - <!-- android:textStyle="bold" />--> | ||
527 | - <!-- </LinearLayout>--> | ||
528 | </RelativeLayout> | 400 | </RelativeLayout> |
529 | </ScrollView> | 401 | </ScrollView> |
530 | </RelativeLayout> | 402 | </RelativeLayout> | ... | ... |
... | @@ -95,9 +95,10 @@ | ... | @@ -95,9 +95,10 @@ |
95 | android:layout_height="match_parent" | 95 | android:layout_height="match_parent" |
96 | android:layout_below="@+id/ll_more_popup" | 96 | android:layout_below="@+id/ll_more_popup" |
97 | android:layout_marginHorizontal="16dp" | 97 | android:layout_marginHorizontal="16dp" |
98 | - android:layout_marginTop="48dp" | 98 | + android:layout_marginTop="4dp" |
99 | android:clipToPadding="false" | 99 | android:clipToPadding="false" |
100 | android:orientation="vertical" | 100 | android:orientation="vertical" |
101 | + android:paddingTop="44dp" | ||
101 | android:paddingBottom="24dp" /> | 102 | android:paddingBottom="24dp" /> |
102 | </RelativeLayout> | 103 | </RelativeLayout> |
103 | </RelativeLayout> | 104 | </RelativeLayout> |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
... | @@ -11,7 +11,7 @@ | ... | @@ -11,7 +11,7 @@ |
11 | <string name="cos_profile_type">Traveller</string> | 11 | <string name="cos_profile_type">Traveller</string> |
12 | <string name="header_add">Προσθήκη</string> | 12 | <string name="header_add">Προσθήκη</string> |
13 | <string name="cos_profile_reward">My Loyalty\nWallet</string> | 13 | <string name="cos_profile_reward">My Loyalty\nWallet</string> |
14 | - <string name="cos_profile_title">My loyalty wallet</string> | 14 | + <string name="cos_profile_title">For You</string> |
15 | <string name="cos_deals_title">Deals for You</string> | 15 | <string name="cos_deals_title">Deals for You</string> |
16 | <string name="cos_profile_more">Δες περισσότερα</string> | 16 | <string name="cos_profile_more">Δες περισσότερα</string> |
17 | <string name="cos_gifts_title">GIFTS for YOU</string> | 17 | <string name="cos_gifts_title">GIFTS for YOU</string> |
... | @@ -67,12 +67,14 @@ | ... | @@ -67,12 +67,14 @@ |
67 | <string name="cos_gift_it">Κάντο δώρο!</string> | 67 | <string name="cos_gift_it">Κάντο δώρο!</string> |
68 | <string name="cos_popup_more_title">COSMOTE MORE FOR YOU</string> | 68 | <string name="cos_popup_more_title">COSMOTE MORE FOR YOU</string> |
69 | <string name="cos_popup_more_subtitle">Εδώ μπορείς να βρεις διαγωνισμούς και\nνα σε επιβραβεύσουμε για τις αθλητικές σου\nδραστηριότητες!</string> | 69 | <string name="cos_popup_more_subtitle">Εδώ μπορείς να βρεις διαγωνισμούς και\nνα σε επιβραβεύσουμε για τις αθλητικές σου\nδραστηριότητες!</string> |
70 | - <string name="cos_deals_win_title">Μέχρι τώρα έχεις κερδίσει 30 κουπόνια\nκαι 20,00€ σε προσφορές!</string> | 70 | + <string name="cos_deals_win_title">Μέχρι τώρα έχεις κερδίσει %1$s€ σε προσφορές από %2$s κουπόνια!</string> |
71 | + <string name="cos_deals_win_title_cos">Μέχρι τώρα έχεις κερδίσει %1$s€ με το DEALS for YOU!</string> | ||
71 | <string name="cos_mygifts">Τα δώρα μου</string> | 72 | <string name="cos_mygifts">Τα δώρα μου</string> |
72 | <string name="cos_gifts_banner_title">Δώρα:</string> | 73 | <string name="cos_gifts_banner_title">Δώρα:</string> |
73 | <string name="cos_see_more">Δες περισσότερα</string> | 74 | <string name="cos_see_more">Δες περισσότερα</string> |
74 | <string name="cos_active_gifts_title">Ενεργά δώρα</string> | 75 | <string name="cos_active_gifts_title">Ενεργά δώρα</string> |
75 | <string name="cos_loyalty_analysis">Ανάλυση συναλλαγών</string> | 76 | <string name="cos_loyalty_analysis">Ανάλυση συναλλαγών</string> |
77 | + <string name="cos_value">%1$s€</string> | ||
76 | 78 | ||
77 | <string-array name="coupons_array"> | 79 | <string-array name="coupons_array"> |
78 | <item>Κουπόνια</item> | 80 | <item>Κουπόνια</item> | ... | ... |
-
Please register or login to post a comment