Panagiotis Triantafyllou

new unified coupons screen with basket part1

...@@ -7,8 +7,10 @@ import android.os.Handler; ...@@ -7,8 +7,10 @@ import android.os.Handler;
7 import android.os.Looper; 7 import android.os.Looper;
8 import android.view.View; 8 import android.view.View;
9 import android.widget.ImageView; 9 import android.widget.ImageView;
10 +import android.widget.RelativeLayout;
10 import android.widget.TextView; 11 import android.widget.TextView;
11 12
13 +import androidx.constraintlayout.widget.ConstraintLayout;
12 import androidx.recyclerview.widget.LinearLayoutManager; 14 import androidx.recyclerview.widget.LinearLayoutManager;
13 import androidx.recyclerview.widget.RecyclerView; 15 import androidx.recyclerview.widget.RecyclerView;
14 16
...@@ -30,6 +32,7 @@ import ly.warp.sdk.utils.WarplyManagerHelper; ...@@ -30,6 +32,7 @@ import ly.warp.sdk.utils.WarplyManagerHelper;
30 import ly.warp.sdk.utils.managers.WarplyAnalyticsManager; 32 import ly.warp.sdk.utils.managers.WarplyAnalyticsManager;
31 import ly.warp.sdk.utils.managers.WarplyEventBusManager; 33 import ly.warp.sdk.utils.managers.WarplyEventBusManager;
32 import ly.warp.sdk.utils.managers.WarplyManager; 34 import ly.warp.sdk.utils.managers.WarplyManager;
35 +import ly.warp.sdk.views.adapters.ActiveCouponAdapter;
33 import ly.warp.sdk.views.adapters.MarketCouponAdapter; 36 import ly.warp.sdk.views.adapters.MarketCouponAdapter;
34 37
35 38
...@@ -43,11 +46,16 @@ public class ActiveUnifiedCouponsActivity extends Activity implements View.OnCli ...@@ -43,11 +46,16 @@ public class ActiveUnifiedCouponsActivity extends Activity implements View.OnCli
43 // Fields 46 // Fields
44 // =========================================================== 47 // ===========================================================
45 48
46 - private ImageView mIvBack; 49 + private ImageView mIvBack, mIvInfo, mIvInfoClose, mIvChooseAll;
47 - private RecyclerView mRecyclerUnifiedCoupons; 50 + private RecyclerView mRecyclerUnifiedCoupons, mRvActiveUnifiedCoupons;
48 private MarketCouponAdapter mAdapterUnifiedCoupons; 51 private MarketCouponAdapter mAdapterUnifiedCoupons;
49 - private TextView mTvEmptyUnifiedCoupons, mFontHeader; 52 + private TextView mTvEmptyUnifiedCoupons, mFontHeader, mTvInnerTitle,
50 - private boolean mUnifiedPressed = false; 53 + mTvInnerSubtitle, mTvInnerClose, mTvUnifieCouponsTitle, mTvActiveUnifiedCouponsTitle,
54 + mTvChooseAll;
55 + private boolean mUnifiedPressed = false, mActiveUnifiedPressed = false;
56 + private ConstraintLayout mClInfoView, mClActiveCouponsHeader;
57 + private RelativeLayout mRlUnifiedCoupons, mRlActiveUnifiedCoupons;
58 + private ActiveCouponAdapter mAdapterCoupons;
51 59
52 // =========================================================== 60 // ===========================================================
53 // Methods for/from SuperClass/Interfaces 61 // Methods for/from SuperClass/Interfaces
...@@ -62,8 +70,26 @@ public class ActiveUnifiedCouponsActivity extends Activity implements View.OnCli ...@@ -62,8 +70,26 @@ public class ActiveUnifiedCouponsActivity extends Activity implements View.OnCli
62 mTvEmptyUnifiedCoupons = findViewById(R.id.tv_no_unified_coupons); 70 mTvEmptyUnifiedCoupons = findViewById(R.id.tv_no_unified_coupons);
63 mRecyclerUnifiedCoupons = findViewById(R.id.rv_active_unified_coupons); 71 mRecyclerUnifiedCoupons = findViewById(R.id.rv_active_unified_coupons);
64 mFontHeader = findViewById(R.id.textView3); 72 mFontHeader = findViewById(R.id.textView3);
65 - WarpUtils.renderCustomFont(this, R.font.bt_cosmo_bold, mFontHeader); 73 + mIvInfo = findViewById(R.id.iv_coupons_info);
66 - WarpUtils.renderCustomFont(this, R.font.peridot_regular, mTvEmptyUnifiedCoupons); 74 + mClInfoView = findViewById(R.id.cl_info_view);
75 + mTvInnerTitle = mClInfoView.findViewById(R.id.tv_inner_title);
76 + mTvInnerSubtitle = mClInfoView.findViewById(R.id.tv_inner_subtitle);
77 + mIvInfoClose = mClInfoView.findViewById(R.id.iv_loyalty_history_close);
78 + mTvInnerClose = mClInfoView.findViewById(R.id.tv_inner_close);
79 + mRlUnifiedCoupons = findViewById(R.id.rl_unified_coupons);
80 + mRecyclerUnifiedCoupons = mRlUnifiedCoupons.findViewById(R.id.rv_active_unified_coupons);
81 + mTvUnifieCouponsTitle = mRlUnifiedCoupons.findViewById(R.id.tv_sm_coupons_title);
82 + mRlActiveUnifiedCoupons = findViewById(R.id.rl_active_unified_coupons);
83 + mRvActiveUnifiedCoupons = mRlActiveUnifiedCoupons.findViewById(R.id.rv_active_single_unified_coupons);
84 + mClActiveCouponsHeader = findViewById(R.id.cl_active_sm_coupons_title);
85 + mTvActiveUnifiedCouponsTitle = mClActiveCouponsHeader.findViewById(R.id.tv_active_sm_coupons_title);
86 + mTvChooseAll = mClActiveCouponsHeader.findViewById(R.id.tv_choose_all);
87 + mIvChooseAll = mClActiveCouponsHeader.findViewById(R.id.iv_choose_all);
88 + WarpUtils.renderCustomFont(this, R.font.bt_cosmo_bold, mFontHeader, mTvInnerTitle,
89 + mTvUnifieCouponsTitle, mTvActiveUnifiedCouponsTitle);
90 + WarpUtils.renderCustomFont(this, R.font.peridot_regular, mTvEmptyUnifiedCoupons, mTvInnerSubtitle);
91 + WarpUtils.renderCustomFont(this, R.font.peridot_bold, mTvInnerClose);
92 + WarpUtils.renderCustomFont(this, R.font.peridot_semi_bold, mTvChooseAll);
67 93
68 initViews(); 94 initViews();
69 } 95 }
...@@ -73,6 +99,7 @@ public class ActiveUnifiedCouponsActivity extends Activity implements View.OnCli ...@@ -73,6 +99,7 @@ public class ActiveUnifiedCouponsActivity extends Activity implements View.OnCli
73 super.onResume(); 99 super.onResume();
74 WarplyAnalyticsManager.logTrackersEvent(this, "screen", "ActiveUnifiedCouponsScreen"); 100 WarplyAnalyticsManager.logTrackersEvent(this, "screen", "ActiveUnifiedCouponsScreen");
75 mUnifiedPressed = false; 101 mUnifiedPressed = false;
102 + mActiveUnifiedPressed = false;
76 filterItems(); 103 filterItems();
77 } 104 }
78 105
...@@ -106,6 +133,18 @@ public class ActiveUnifiedCouponsActivity extends Activity implements View.OnCli ...@@ -106,6 +133,18 @@ public class ActiveUnifiedCouponsActivity extends Activity implements View.OnCli
106 public void onClick(View view) { 133 public void onClick(View view) {
107 if (view.getId() == R.id.iv_coupons_close) { 134 if (view.getId() == R.id.iv_coupons_close) {
108 onBackPressed(); 135 onBackPressed();
136 + return;
137 + }
138 + if (view.getId() == R.id.iv_coupons_info) {
139 + mClInfoView.setVisibility(View.VISIBLE);
140 + return;
141 + }
142 + if (view.getId() == R.id.iv_loyalty_history_close || view.getId() == R.id.tv_inner_close) {
143 + mClInfoView.setVisibility(View.GONE);
144 + return;
145 + }
146 + if (view.getId() == R.id.iv_choose_all) {
147 +
109 } 148 }
110 } 149 }
111 150
...@@ -115,10 +154,20 @@ public class ActiveUnifiedCouponsActivity extends Activity implements View.OnCli ...@@ -115,10 +154,20 @@ public class ActiveUnifiedCouponsActivity extends Activity implements View.OnCli
115 154
116 private void initViews() { 155 private void initViews() {
117 mIvBack.setOnClickListener(this); 156 mIvBack.setOnClickListener(this);
157 + mIvInfo.setOnClickListener(this);
158 + mIvInfoClose.setOnClickListener(this);
159 + mTvInnerClose.setOnClickListener(this);
160 + mIvChooseAll.setOnClickListener(this);
118 } 161 }
119 162
120 private void filterItems() { 163 private void filterItems() {
121 - if (WarplyManagerHelper.getMarketCouponsList() != null && WarplyManagerHelper.getMarketCouponsList().size() > 0) { 164 + if (WarplyManagerHelper.getMarketCouponsList() != null && WarplyManagerHelper.getMarketCouponsList().isEmpty()
165 + && WarplyManagerHelper.getSmCouponsList() != null && WarplyManagerHelper.getSmCouponsList().isEmpty()) {
166 + mTvEmptyUnifiedCoupons.setVisibility(View.VISIBLE);
167 + }
168 +
169 +
170 + if (WarplyManagerHelper.getMarketCouponsList() != null && !WarplyManagerHelper.getMarketCouponsList().isEmpty()) {
122 ArrayList<UnifiedCoupon> unilist = new ArrayList<UnifiedCoupon>(); 171 ArrayList<UnifiedCoupon> unilist = new ArrayList<UnifiedCoupon>();
123 for (UnifiedCoupon unicpn : WarplyManagerHelper.getMarketCouponsList()) { 172 for (UnifiedCoupon unicpn : WarplyManagerHelper.getMarketCouponsList()) {
124 SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss"); 173 SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
...@@ -151,9 +200,38 @@ public class ActiveUnifiedCouponsActivity extends Activity implements View.OnCli ...@@ -151,9 +200,38 @@ public class ActiveUnifiedCouponsActivity extends Activity implements View.OnCli
151 .doOnError(error -> { 200 .doOnError(error -> {
152 }) 201 })
153 .subscribe(); 202 .subscribe();
203 +
204 + mRlUnifiedCoupons.setVisibility(View.VISIBLE);
154 } else { 205 } else {
155 - mRecyclerUnifiedCoupons.setVisibility(View.GONE); 206 + mRlUnifiedCoupons.setVisibility(View.GONE);
156 - mTvEmptyUnifiedCoupons.setVisibility(View.VISIBLE); 207 + }
208 +
209 + if (WarplyManagerHelper.getSmCouponsList() != null && !WarplyManagerHelper.getSmCouponsList().isEmpty()) {
210 + Collections.sort(WarplyManagerHelper.getSmCouponsList(), (coupon1, coupon2) -> coupon2.getExpirationDate().compareTo(coupon1.getExpirationDate()));
211 +
212 + mRvActiveUnifiedCoupons.setLayoutManager(new LinearLayoutManager(this, LinearLayoutManager.VERTICAL, false));
213 + mAdapterCoupons = new ActiveCouponAdapter(this, WarplyManagerHelper.getSmCouponsList(), false, false, true);
214 + mRvActiveUnifiedCoupons.setAdapter(mAdapterCoupons);
215 + mAdapterCoupons.getPositionClicks()
216 + .doOnNext(coupon -> {
217 + if (!mActiveUnifiedPressed) {
218 + mActiveUnifiedPressed = true;
219 + WarplyAnalyticsManager.logTrackersEvent(this, "click", ("MarketCoupon").concat(":").concat(coupon.getName()));
220 + Intent intent = new Intent(ActiveUnifiedCouponsActivity.this, CouponInfoActivity.class);
221 + intent.putExtra("coupon", coupon.getCoupon());
222 + intent.putExtra("isFromWallet", true);
223 +// intent.putExtra("isUnified", true);
224 +// intent.putExtra("unifiedCoupon", coupon.getBarcode());
225 + startActivity(intent);
226 + }
227 + })
228 + .doOnError(error -> {
229 + })
230 + .subscribe();
231 +
232 + mRlActiveUnifiedCoupons.setVisibility(View.VISIBLE);
233 + } else {
234 + mRlActiveUnifiedCoupons.setVisibility(View.GONE);
157 } 235 }
158 } 236 }
159 237
......
...@@ -21,6 +21,8 @@ import com.bumptech.glide.load.engine.DiskCacheStrategy; ...@@ -21,6 +21,8 @@ import com.bumptech.glide.load.engine.DiskCacheStrategy;
21 import java.text.ParseException; 21 import java.text.ParseException;
22 import java.text.SimpleDateFormat; 22 import java.text.SimpleDateFormat;
23 import java.util.Date; 23 import java.util.Date;
24 +import java.util.HashSet;
25 +import java.util.Set;
24 import java.util.concurrent.TimeUnit; 26 import java.util.concurrent.TimeUnit;
25 27
26 import io.reactivex.Observable; 28 import io.reactivex.Observable;
...@@ -36,7 +38,8 @@ public class ActiveCouponAdapter extends RecyclerView.Adapter<ActiveCouponAdapte ...@@ -36,7 +38,8 @@ public class ActiveCouponAdapter extends RecyclerView.Adapter<ActiveCouponAdapte
36 private Context mContext; 38 private Context mContext;
37 private CouponList mCoupons; 39 private CouponList mCoupons;
38 private final PublishSubject<Coupon> onClickSubject = PublishSubject.create(); 40 private final PublishSubject<Coupon> onClickSubject = PublishSubject.create();
39 - private boolean mIsPast = false, mIsCustom = false; 41 + private boolean mIsPast = false, mIsCustom = false, mIsActiveSM = false;
42 + private Set<Coupon> mSelectedItems = new HashSet<>();
40 43
41 public ActiveCouponAdapter(Context mContext, CouponList campaignList) { 44 public ActiveCouponAdapter(Context mContext, CouponList campaignList) {
42 this.mContext = mContext; 45 this.mContext = mContext;
...@@ -57,11 +60,19 @@ public class ActiveCouponAdapter extends RecyclerView.Adapter<ActiveCouponAdapte ...@@ -57,11 +60,19 @@ public class ActiveCouponAdapter extends RecyclerView.Adapter<ActiveCouponAdapte
57 this.mIsCustom = custom; 60 this.mIsCustom = custom;
58 } 61 }
59 62
63 + public ActiveCouponAdapter(Context mContext, CouponList campaignList, boolean past, boolean custom, boolean isActiveSM) {
64 + this.mContext = mContext;
65 + this.mCoupons = campaignList;
66 + this.mIsPast = past;
67 + this.mIsCustom = custom;
68 + this.mIsActiveSM = isActiveSM;
69 + }
70 +
60 public class ActiveCouponViewHolder extends RecyclerView.ViewHolder { 71 public class ActiveCouponViewHolder extends RecyclerView.ViewHolder {
61 - private ImageView ivCouponLogo, ivCouponBackground; 72 + private ImageView ivCouponLogo, ivCouponBackground, ivChooseCoupon;
62 private TextView tvCouponTitle, tvCouponValue, tvCouponDate, tvDateLimit, 73 private TextView tvCouponTitle, tvCouponValue, tvCouponDate, tvDateLimit,
63 tvCouponDescription, tvCouponDateExpired, tvDateLimitTitle; 74 tvCouponDescription, tvCouponDateExpired, tvDateLimitTitle;
64 - private ConstraintLayout clCustomLayout; 75 + private ConstraintLayout clCustomLayout, clActiveCustomLayout;
65 private LinearLayout lLDateLimit; 76 private LinearLayout lLDateLimit;
66 77
67 public ActiveCouponViewHolder(View view) { 78 public ActiveCouponViewHolder(View view) {
...@@ -73,10 +84,12 @@ public class ActiveCouponAdapter extends RecyclerView.Adapter<ActiveCouponAdapte ...@@ -73,10 +84,12 @@ public class ActiveCouponAdapter extends RecyclerView.Adapter<ActiveCouponAdapte
73 tvCouponDate = view.findViewById(R.id.tv_active_coupons_date); 84 tvCouponDate = view.findViewById(R.id.tv_active_coupons_date);
74 tvCouponDescription = view.findViewById(R.id.tv_active_coupons_description); 85 tvCouponDescription = view.findViewById(R.id.tv_active_coupons_description);
75 clCustomLayout = view.findViewById(R.id.cl_custom_layout); 86 clCustomLayout = view.findViewById(R.id.cl_custom_layout);
87 + clActiveCustomLayout = view.findViewById(R.id.cl_active_custom_layout);
76 tvCouponDateExpired = view.findViewById(R.id.tv_active_coupons_date_expired); 88 tvCouponDateExpired = view.findViewById(R.id.tv_active_coupons_date_expired);
77 tvDateLimit = view.findViewById(R.id.tv_active_coupons_date_limit); 89 tvDateLimit = view.findViewById(R.id.tv_active_coupons_date_limit);
78 tvDateLimitTitle = view.findViewById(R.id.tv_active_coupons_date_limit_title); 90 tvDateLimitTitle = view.findViewById(R.id.tv_active_coupons_date_limit_title);
79 lLDateLimit = view.findViewById(R.id.ll_date_limit); 91 lLDateLimit = view.findViewById(R.id.ll_date_limit);
92 + ivChooseCoupon = view.findViewById(R.id.iv_choose_coupon);
80 93
81 WarpUtils.renderCustomFont(mContext, R.font.bt_cosmo_bold, tvCouponTitle, tvCouponValue); 94 WarpUtils.renderCustomFont(mContext, R.font.bt_cosmo_bold, tvCouponTitle, tvCouponValue);
82 WarpUtils.renderCustomFont(mContext, R.font.peridot_regular, tvCouponDescription, tvCouponDate); 95 WarpUtils.renderCustomFont(mContext, R.font.peridot_regular, tvCouponDescription, tvCouponDate);
...@@ -111,6 +124,8 @@ public class ActiveCouponAdapter extends RecyclerView.Adapter<ActiveCouponAdapte ...@@ -111,6 +124,8 @@ public class ActiveCouponAdapter extends RecyclerView.Adapter<ActiveCouponAdapte
111 itemView = LayoutInflater.from(parent.getContext()).inflate(R.layout.past_coupon_layout, parent, false); 124 itemView = LayoutInflater.from(parent.getContext()).inflate(R.layout.past_coupon_layout, parent, false);
112 else if (mIsCustom) 125 else if (mIsCustom)
113 itemView = LayoutInflater.from(parent.getContext()).inflate(R.layout.custom_coupon_layout, parent, false); 126 itemView = LayoutInflater.from(parent.getContext()).inflate(R.layout.custom_coupon_layout, parent, false);
127 + else if (mIsActiveSM)
128 + itemView = LayoutInflater.from(parent.getContext()).inflate(R.layout.custom_active_coupon_layout, parent, false);
114 else 129 else
115 itemView = LayoutInflater.from(parent.getContext()).inflate(R.layout.active_coupon_layout, parent, false); 130 itemView = LayoutInflater.from(parent.getContext()).inflate(R.layout.active_coupon_layout, parent, false);
116 return new ActiveCouponViewHolder(itemView); 131 return new ActiveCouponViewHolder(itemView);
...@@ -120,6 +135,7 @@ public class ActiveCouponAdapter extends RecyclerView.Adapter<ActiveCouponAdapte ...@@ -120,6 +135,7 @@ public class ActiveCouponAdapter extends RecyclerView.Adapter<ActiveCouponAdapte
120 public void onBindViewHolder(final ActiveCouponViewHolder holder, int position) { 135 public void onBindViewHolder(final ActiveCouponViewHolder holder, int position) {
121 Coupon couponItem = mCoupons.get(position); 136 Coupon couponItem = mCoupons.get(position);
122 Merchant merchant = new Merchant(); 137 Merchant merchant = new Merchant();
138 +
123 if (mIsPast) 139 if (mIsPast)
124 holder.ivCouponBackground.setColorFilter(ContextCompat.getColor(mContext, R.color.grey_light3), android.graphics.PorterDuff.Mode.MULTIPLY); 140 holder.ivCouponBackground.setColorFilter(ContextCompat.getColor(mContext, R.color.grey_light3), android.graphics.PorterDuff.Mode.MULTIPLY);
125 if (couponItem != null) { 141 if (couponItem != null) {
...@@ -218,6 +234,28 @@ public class ActiveCouponAdapter extends RecyclerView.Adapter<ActiveCouponAdapte ...@@ -218,6 +234,28 @@ public class ActiveCouponAdapter extends RecyclerView.Adapter<ActiveCouponAdapte
218 return; 234 return;
219 } 235 }
220 236
237 + if (mIsActiveSM) {
238 + if (mSelectedItems.contains(couponItem)) {
239 + holder.ivChooseCoupon.setBackgroundResource(R.drawable.ic_circle_checked_skyblue);
240 + holder.clActiveCustomLayout.setBackgroundResource(R.drawable.ic_coupon_background_new3_border_skyblue);
241 + } else {
242 + holder.ivChooseCoupon.setBackgroundResource(R.drawable.ic_circle_gray);
243 + holder.clActiveCustomLayout.setBackgroundResource(R.drawable.ic_coupon_background_new3);
244 + }
245 +
246 + holder.ivChooseCoupon.setOnClickListener(v -> {
247 + if (mSelectedItems.contains(couponItem)) {
248 + mSelectedItems.remove(couponItem);
249 + holder.ivChooseCoupon.setBackgroundResource(R.drawable.ic_circle_gray);
250 + holder.clActiveCustomLayout.setBackgroundResource(R.drawable.ic_coupon_background_new3);
251 + } else {
252 + mSelectedItems.add(couponItem);
253 + holder.ivChooseCoupon.setBackgroundResource(R.drawable.ic_circle_checked_skyblue);
254 + holder.clActiveCustomLayout.setBackgroundResource(R.drawable.ic_coupon_background_new3_border_skyblue);
255 + }
256 + });
257 + }
258 +
221 if (!TextUtils.isEmpty(couponItem.getMerchantDetails().getImgPreview())) { 259 if (!TextUtils.isEmpty(couponItem.getMerchantDetails().getImgPreview())) {
222 Glide.with(mContext) 260 Glide.with(mContext)
223 // .setDefaultRequestOptions( 261 // .setDefaultRequestOptions(
...@@ -285,6 +323,10 @@ public class ActiveCouponAdapter extends RecyclerView.Adapter<ActiveCouponAdapte ...@@ -285,6 +323,10 @@ public class ActiveCouponAdapter extends RecyclerView.Adapter<ActiveCouponAdapte
285 } 323 }
286 } 324 }
287 325
326 + public Set<Coupon> getSelectedCoupons() {
327 + return mSelectedItems;
328 + }
329 +
288 private long getDaysBetweenDates(String start, String end) { 330 private long getDaysBetweenDates(String start, String end) {
289 SimpleDateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy"); 331 SimpleDateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy");
290 Date startDate, endDate; 332 Date startDate, endDate;
......
1 +<?xml version="1.0" encoding="UTF-8"?>
2 +<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
3 +
4 + <!-- Shadow layer -->
5 +<!-- <item>-->
6 +<!-- <shape android:shape="rectangle">-->
7 +<!-- <solid android:color="#00000000" /> &lt;!&ndash; Transparent color &ndash;&gt;-->
8 +<!-- <corners android:radius="20dp" />-->
9 +<!-- <padding/>-->
10 +<!-- <size android:width="0dp" android:height="0dp"/>-->
11 +<!-- <gradient-->
12 +<!-- android:startColor="#00000091"-->
13 +<!-- android:endColor="#00000000"-->
14 +<!-- android:angle="270"/>-->
15 +<!-- </shape>-->
16 +<!-- </item>-->
17 +
18 + <!-- Background layer -->
19 + <item>
20 + <shape android:shape="rectangle">
21 + <solid android:color="@color/cos_grey2" /> <!-- Background color -->
22 + <corners android:radius="14dp" /> <!-- Rounded corners -->
23 + </shape>
24 + </item>
25 +
26 +</layer-list>
...\ No newline at end of file ...\ No newline at end of file
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
3 + xmlns:app="http://schemas.android.com/apk/res-auto"
4 + xmlns:custom="http://schemas.android.com/apk/res-auto"
5 + xmlns:tools="http://schemas.android.com/tools"
6 + android:layout_width="match_parent"
7 + android:layout_height="145dp"
8 + android:layout_marginHorizontal="6dp"
9 + android:layout_marginBottom="3dp"
10 + android:id="@+id/cl_active_custom_layout"
11 + android:background="@drawable/ic_coupon_background_new3">
12 +
13 + <androidx.constraintlayout.widget.Guideline
14 + android:id="@+id/gl_vertical_72_percent"
15 + android:layout_width="wrap_content"
16 + android:layout_height="wrap_content"
17 + android:orientation="vertical"
18 + app:layout_constraintGuide_percent="0.72" />
19 +
20 + <ImageView
21 + android:id="@+id/iv_active_coupon"
22 + android:layout_width="80dp"
23 + android:layout_height="80dp"
24 + android:layout_marginStart="24dp"
25 + app:layout_constraintBottom_toBottomOf="parent"
26 + app:layout_constraintStart_toStartOf="parent"
27 + app:layout_constraintTop_toTopOf="parent"
28 + tools:src="@drawable/ic_gifts_for_you" />
29 +
30 + <ly.warp.sdk.views.DividerView
31 + android:id="@+id/v_separator"
32 + android:layout_width="1dp"
33 + android:layout_height="0dp"
34 + android:layout_marginVertical="16dp"
35 + android:layout_marginStart="16dp"
36 + android:layerType="software"
37 + app:layout_constraintBottom_toBottomOf="parent"
38 + app:layout_constraintStart_toEndOf="@+id/iv_active_coupon"
39 + app:layout_constraintTop_toTopOf="parent"
40 + custom:color="@color/cos_gray"
41 + custom:dashGap="10dp"
42 + custom:dashLength="10dp"
43 + custom:dashThickness="1dp"
44 + custom:orientation="vertical" />
45 +
46 + <LinearLayout
47 + android:id="@+id/ll_coupon_info"
48 + android:layout_width="0dp"
49 + android:layout_height="wrap_content"
50 + android:layout_marginHorizontal="16dp"
51 + android:orientation="vertical"
52 + app:layout_constraintBottom_toBottomOf="parent"
53 + app:layout_constraintEnd_toEndOf="parent"
54 + app:layout_constraintStart_toEndOf="@+id/v_separator"
55 + app:layout_constraintTop_toTopOf="parent">
56 +
57 + <TextView
58 + android:id="@+id/tv_active_coupons_title"
59 + android:layout_width="wrap_content"
60 + android:layout_height="wrap_content"
61 + android:ellipsize="end"
62 + android:maxLines="1"
63 + android:textColor="@color/cos_light_black"
64 + android:textSize="16sp"
65 + tools:text="Εκπτωτικο κουπονι 10$ για αγορες στα ΙΚΕΑ" />
66 +
67 + <androidx.constraintlayout.widget.ConstraintLayout
68 + android:layout_width="match_parent"
69 + android:layout_height="wrap_content">
70 +
71 + <androidx.constraintlayout.widget.Guideline
72 + android:id="@+id/gl_vertical_62_percent_inner"
73 + android:layout_width="wrap_content"
74 + android:layout_height="wrap_content"
75 + android:orientation="vertical"
76 + app:layout_constraintGuide_percent="0.62" />
77 +
78 + <TextView
79 + android:id="@+id/tv_active_coupons_value"
80 + android:layout_width="wrap_content"
81 + android:layout_height="wrap_content"
82 + android:textColor="@color/cos_light_black"
83 + android:textSize="42sp"
84 + app:layout_constraintBottom_toBottomOf="parent"
85 + app:layout_constraintStart_toStartOf="parent"
86 + app:layout_constraintTop_toTopOf="parent"
87 + tools:text="10$" />
88 +
89 + <TextView
90 + android:id="@+id/tv_active_coupons_description"
91 + android:layout_width="0dp"
92 + android:layout_height="wrap_content"
93 + android:ellipsize="end"
94 + android:maxLines="3"
95 + android:textColor="@color/cos_light_black"
96 + android:textSize="12sp"
97 + app:layout_constraintBottom_toBottomOf="parent"
98 + app:layout_constraintEnd_toEndOf="parent"
99 + app:layout_constraintHorizontal_bias="0.0"
100 + app:layout_constraintStart_toEndOf="@+id/gl_vertical_62_percent_inner"
101 + app:layout_constraintTop_toTopOf="parent"
102 + app:layout_constraintVertical_bias="0.545"
103 + tools:text="Εκπτωση με ελάχιστες αγορές 100€" />
104 + </androidx.constraintlayout.widget.ConstraintLayout>
105 +
106 + <TextView
107 + android:id="@+id/tv_active_coupons_date"
108 + android:layout_width="wrap_content"
109 + android:layout_height="wrap_content"
110 + android:textColor="@color/cos_light_black"
111 + android:textSize="12sp"
112 + tools:text="@string/cos_active_coupon_date" />
113 + </LinearLayout>
114 +
115 + <ImageView
116 + android:id="@+id/iv_choose_coupon"
117 + android:layout_width="24dp"
118 + android:layout_height="24dp"
119 + android:layout_marginTop="8dp"
120 + android:layout_marginEnd="8dp"
121 + app:layout_constraintEnd_toEndOf="parent"
122 + app:layout_constraintTop_toTopOf="parent"
123 + tools:src="@drawable/ic_circle_gray" />
124 +</androidx.constraintlayout.widget.ConstraintLayout>
...\ No newline at end of file ...\ No newline at end of file
...@@ -75,6 +75,9 @@ ...@@ -75,6 +75,9 @@
75 <string name="cos_no_active_rewards">Δεν υπάρχουν δώρα</string> 75 <string name="cos_no_active_rewards">Δεν υπάρχουν δώρα</string>
76 <string name="cos_past_all_coupons">Παλαιότερα κουπόνια</string> 76 <string name="cos_past_all_coupons">Παλαιότερα κουπόνια</string>
77 <string name="cos_coupon_expired_date">Εξαργυρώθηκε την %1$s</string> 77 <string name="cos_coupon_expired_date">Εξαργυρώθηκε την %1$s</string>
78 + <string name="cos_coupon_unified_title">Ενιαία κουπόνια</string>
79 + <string name="cos_coupon_active_unified_title">Κουπόνια</string>
80 + <string name="cos_coupon_active_unified_choose_all_title">Επιλογή όλων</string>
78 <string name="cos_popup_gifts_title">COSMOTE GIFTS FOR YOU</string> 81 <string name="cos_popup_gifts_title">COSMOTE GIFTS FOR YOU</string>
79 <string name="cos_popup_gifts_subtitle">Σε αυτή την ενότητα βρίσκεις τα διαθέσιμα δώρα και επιβραβεύσεις αποκλειστικά για σένα!</string> 82 <string name="cos_popup_gifts_subtitle">Σε αυτή την ενότητα βρίσκεις τα διαθέσιμα δώρα και επιβραβεύσεις αποκλειστικά για σένα!</string>
80 <string name="cos_mycoupon_date">Το κουπόνι ισχύει έως %1$s</string> 83 <string name="cos_mycoupon_date">Το κουπόνι ισχύει έως %1$s</string>
...@@ -165,6 +168,8 @@ ...@@ -165,6 +168,8 @@
165 <string name="cos_dlg_no_shops_positive">Δες το eshop</string> 168 <string name="cos_dlg_no_shops_positive">Δες το eshop</string>
166 <string name="cos_profile_preferences_placeholder">Οι προτιμήσεις μου</string> 169 <string name="cos_profile_preferences_placeholder">Οι προτιμήσεις μου</string>
167 <string name="cos_market_title">SUPERMARKET DEALS</string> 170 <string name="cos_market_title">SUPERMARKET DEALS</string>
171 + <string name="cos_market_subtitle">Δημιούργησε το δικό σου ενιαίο κουπόνι προσφορών, και εξαργύρωσέ το στα supermarket της επιλογής σου γρήγορα και εύκολα με ένα μόνο κωδικό κουπονιού!</string>
172 + <string name="cos_market_close">Τέλος</string>
168 <string name="cos_rewards_title2">COSMOTE Επιβράβευση</string> 173 <string name="cos_rewards_title2">COSMOTE Επιβράβευση</string>
169 <string name="cos_market_item_title">COSMOTE\nSUPERMARKET\nDEALS</string> 174 <string name="cos_market_item_title">COSMOTE\nSUPERMARKET\nDEALS</string>
170 <string name="cos_market_active_coupons">έχεις %1$s ενεργά κουπόνια αξίας %2$s€</string> 175 <string name="cos_market_active_coupons">έχεις %1$s ενεργά κουπόνια αξίας %2$s€</string>
......