Showing
22 changed files
with
738 additions
and
384 deletions
... | @@ -67,6 +67,11 @@ | ... | @@ -67,6 +67,11 @@ |
67 | android:screenOrientation="portrait" /> | 67 | android:screenOrientation="portrait" /> |
68 | 68 | ||
69 | <activity | 69 | <activity |
70 | + android:name="ly.warp.sdk.activities.LoyaltyWallet" | ||
71 | + android:exported="false" | ||
72 | + android:screenOrientation="portrait" /> | ||
73 | + | ||
74 | + <activity | ||
70 | android:name="ly.warp.sdk.dexter.PermissionsActivity" | 75 | android:name="ly.warp.sdk.dexter.PermissionsActivity" |
71 | android:exported="false" | 76 | android:exported="false" |
72 | android:launchMode="singleInstance" | 77 | android:launchMode="singleInstance" | ... | ... |
... | @@ -15,10 +15,8 @@ import android.widget.TextView; | ... | @@ -15,10 +15,8 @@ import android.widget.TextView; |
15 | import com.bumptech.glide.Glide; | 15 | import com.bumptech.glide.Glide; |
16 | import com.bumptech.glide.load.engine.DiskCacheStrategy; | 16 | import com.bumptech.glide.load.engine.DiskCacheStrategy; |
17 | import com.google.zxing.BarcodeFormat; | 17 | import com.google.zxing.BarcodeFormat; |
18 | -import com.google.zxing.WriterException; | ||
19 | import com.google.zxing.common.BitMatrix; | 18 | import com.google.zxing.common.BitMatrix; |
20 | import com.google.zxing.oned.EAN13Writer; | 19 | import com.google.zxing.oned.EAN13Writer; |
21 | -import com.google.zxing.qrcode.QRCodeWriter; | ||
22 | 20 | ||
23 | import java.text.ParseException; | 21 | import java.text.ParseException; |
24 | import java.text.SimpleDateFormat; | 22 | import java.text.SimpleDateFormat; |
... | @@ -94,16 +92,17 @@ public class CouponInfoActivity extends Activity implements View.OnClickListener | ... | @@ -94,16 +92,17 @@ public class CouponInfoActivity extends Activity implements View.OnClickListener |
94 | mTvCouponCode.setText(mCoupon.getCoupon()); | 92 | mTvCouponCode.setText(mCoupon.getCoupon()); |
95 | mTvCouponTitle.setText(mCoupon.getName()); | 93 | mTvCouponTitle.setText(mCoupon.getName()); |
96 | mTvCouponSubtitle.setText(mCoupon.getDescription()); | 94 | mTvCouponSubtitle.setText(mCoupon.getDescription()); |
97 | - String strCurrentDate = mCoupon.getExpiration(); | 95 | + |
98 | - SimpleDateFormat format = new SimpleDateFormat("dd/MM/yyyy"); | 96 | + SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd hh:mm"); |
99 | Date newDate = new Date(); | 97 | Date newDate = new Date(); |
100 | try { | 98 | try { |
101 | - newDate = format.parse(strCurrentDate); | 99 | + newDate = simpleDateFormat.parse(mCoupon.getExpiration()); |
102 | } catch (ParseException e) { | 100 | } catch (ParseException e) { |
103 | e.printStackTrace(); | 101 | e.printStackTrace(); |
104 | } | 102 | } |
105 | - mTvCouponDate.setText(String.format(getResources().getString(R.string.cos_coupon_date), | 103 | + simpleDateFormat = new SimpleDateFormat("dd/MM/yyyy"); |
106 | - format.format(newDate))); | 104 | + mTvCouponDate.setText(String.format(getResources().getString(R.string.cos_coupon_date), simpleDateFormat.format(newDate != null ? newDate : ""))); |
105 | + | ||
107 | if (!TextUtils.isEmpty(mCoupon.getImage())) { | 106 | if (!TextUtils.isEmpty(mCoupon.getImage())) { |
108 | Glide.with(this) | 107 | Glide.with(this) |
109 | // .setDefaultRequestOptions( | 108 | // .setDefaultRequestOptions( | ... | ... |
... | @@ -10,16 +10,7 @@ import android.widget.ImageView; | ... | @@ -10,16 +10,7 @@ import android.widget.ImageView; |
10 | import android.widget.Spinner; | 10 | import android.widget.Spinner; |
11 | import android.widget.TextView; | 11 | import android.widget.TextView; |
12 | 12 | ||
13 | -import androidx.recyclerview.widget.LinearLayoutManager; | ||
14 | -import androidx.recyclerview.widget.RecyclerView; | ||
15 | - | ||
16 | -import java.io.Serializable; | ||
17 | - | ||
18 | import ly.warp.sdk.R; | 13 | import ly.warp.sdk.R; |
19 | -import ly.warp.sdk.io.models.Campaign; | ||
20 | -import ly.warp.sdk.io.models.CampaignList; | ||
21 | -import ly.warp.sdk.utils.WarplyManagerHelper; | ||
22 | -import ly.warp.sdk.views.adapters.HomeCouponAdapter; | ||
23 | 14 | ||
24 | 15 | ||
25 | public class LoyaltyActivity extends Activity implements View.OnClickListener, | 16 | public class LoyaltyActivity extends Activity implements View.OnClickListener, |
... | @@ -34,10 +25,8 @@ public class LoyaltyActivity extends Activity implements View.OnClickListener, | ... | @@ -34,10 +25,8 @@ public class LoyaltyActivity extends Activity implements View.OnClickListener, |
34 | // =========================================================== | 25 | // =========================================================== |
35 | 26 | ||
36 | private ImageView mIvBack; | 27 | private ImageView mIvBack; |
37 | - private RecyclerView mRecyclerCoupons, mRecyclerBurntCoupons; | ||
38 | - private HomeCouponAdapter mAdapterCoupons, mAdapterBurntCoupons; | ||
39 | private Spinner mCouponSpinner, mRedemptionSpinner; | 28 | private Spinner mCouponSpinner, mRedemptionSpinner; |
40 | - private TextView mTvAnalysisButton, mTvUsername, mTvQuestionnaire; | 29 | + private TextView mTvAnalysisButton; |
41 | 30 | ||
42 | // =========================================================== | 31 | // =========================================================== |
43 | // Methods for/from SuperClass/Interfaces | 32 | // Methods for/from SuperClass/Interfaces |
... | @@ -49,14 +38,9 @@ public class LoyaltyActivity extends Activity implements View.OnClickListener, | ... | @@ -49,14 +38,9 @@ public class LoyaltyActivity extends Activity implements View.OnClickListener, |
49 | setContentView(R.layout.activity_loyalty); | 38 | setContentView(R.layout.activity_loyalty); |
50 | 39 | ||
51 | mIvBack = findViewById(R.id.iv_back); | 40 | mIvBack = findViewById(R.id.iv_back); |
52 | - | ||
53 | - mRecyclerCoupons = findViewById(R.id.rv_loyalty_coupons); | ||
54 | - mRecyclerBurntCoupons = findViewById(R.id.rv_loyalty_burnt_coupons); | ||
55 | mCouponSpinner = findViewById(R.id.sp_coupons); | 41 | mCouponSpinner = findViewById(R.id.sp_coupons); |
56 | mRedemptionSpinner = findViewById(R.id.sp_redemption); | 42 | mRedemptionSpinner = findViewById(R.id.sp_redemption); |
57 | mTvAnalysisButton = findViewById(R.id.rl_analysis_row).findViewById(R.id.cl_chart_info).findViewById(R.id.tv_analysis_details); | 43 | mTvAnalysisButton = findViewById(R.id.rl_analysis_row).findViewById(R.id.cl_chart_info).findViewById(R.id.tv_analysis_details); |
58 | - mTvUsername = findViewById(R.id.cl_loyalty_info_banner).findViewById(R.id.tv_card_username); | ||
59 | - mTvQuestionnaire = findViewById(R.id.cl_loyalty_info_banner).findViewById(R.id.tv_questionnaire); | ||
60 | 44 | ||
61 | initViews(); | 45 | initViews(); |
62 | } | 46 | } |
... | @@ -75,24 +59,6 @@ public class LoyaltyActivity extends Activity implements View.OnClickListener, | ... | @@ -75,24 +59,6 @@ public class LoyaltyActivity extends Activity implements View.OnClickListener, |
75 | if (view.getId() == R.id.tv_analysis_details) { | 59 | if (view.getId() == R.id.tv_analysis_details) { |
76 | Intent intent = new Intent(this, CouponTransactionActivity.class); | 60 | Intent intent = new Intent(this, CouponTransactionActivity.class); |
77 | startActivity(intent); | 61 | startActivity(intent); |
78 | - return; | ||
79 | - } | ||
80 | - if (view.getId() == R.id.tv_questionnaire) { | ||
81 | - CampaignList cl = WarplyManagerHelper.getUniqueCampaignList().get("more"); | ||
82 | - Campaign camp = null; | ||
83 | - if (cl != null) { | ||
84 | - for (Campaign cn : cl) { | ||
85 | - if (cn.getSessionUUID().equals("4fc2865e32bd4d5495a3dfdf1472da7f")) { | ||
86 | - camp = cn; | ||
87 | - break; | ||
88 | - } | ||
89 | - } | ||
90 | - } | ||
91 | - | ||
92 | - if (camp == null) | ||
93 | - return; | ||
94 | - | ||
95 | - startActivity(WarpViewActivity.createIntentFromURL(LoyaltyActivity.this, WarplyManagerHelper.constructCampaignUrl(camp))); | ||
96 | } | 62 | } |
97 | } | 63 | } |
98 | 64 | ||
... | @@ -109,8 +75,6 @@ public class LoyaltyActivity extends Activity implements View.OnClickListener, | ... | @@ -109,8 +75,6 @@ public class LoyaltyActivity extends Activity implements View.OnClickListener, |
109 | findViewById(R.id.cl_chart_info).findViewById(R.id.analysis_tab).setVisibility(View.GONE); | 75 | findViewById(R.id.cl_chart_info).findViewById(R.id.analysis_tab).setVisibility(View.GONE); |
110 | findViewById(R.id.cl_chart_info).findViewById(R.id.analysis_tab2).setVisibility(View.GONE); | 76 | findViewById(R.id.cl_chart_info).findViewById(R.id.analysis_tab2).setVisibility(View.GONE); |
111 | findViewById(R.id.cl_chart_info).findViewById(R.id.analysis_tab3).setVisibility(View.GONE); | 77 | findViewById(R.id.cl_chart_info).findViewById(R.id.analysis_tab3).setVisibility(View.GONE); |
112 | - findViewById(R.id.cl_chart_info).findViewById(R.id.analysis_tab4).setVisibility(View.VISIBLE); | ||
113 | - findViewById(R.id.cl_chart_info).findViewById(R.id.analysis_tab5).setVisibility(View.VISIBLE); | ||
114 | } else { | 78 | } else { |
115 | mRedemptionSpinner.setVisibility(View.VISIBLE); | 79 | mRedemptionSpinner.setVisibility(View.VISIBLE); |
116 | findViewById(R.id.cl_chart).findViewById(R.id.cl_inner_chart).setVisibility(View.VISIBLE); | 80 | findViewById(R.id.cl_chart).findViewById(R.id.cl_inner_chart).setVisibility(View.VISIBLE); |
... | @@ -119,8 +83,6 @@ public class LoyaltyActivity extends Activity implements View.OnClickListener, | ... | @@ -119,8 +83,6 @@ public class LoyaltyActivity extends Activity implements View.OnClickListener, |
119 | findViewById(R.id.cl_chart_info).findViewById(R.id.analysis_tab).setVisibility(View.VISIBLE); | 83 | findViewById(R.id.cl_chart_info).findViewById(R.id.analysis_tab).setVisibility(View.VISIBLE); |
120 | findViewById(R.id.cl_chart_info).findViewById(R.id.analysis_tab2).setVisibility(View.VISIBLE); | 84 | findViewById(R.id.cl_chart_info).findViewById(R.id.analysis_tab2).setVisibility(View.VISIBLE); |
121 | findViewById(R.id.cl_chart_info).findViewById(R.id.analysis_tab3).setVisibility(View.VISIBLE); | 85 | findViewById(R.id.cl_chart_info).findViewById(R.id.analysis_tab3).setVisibility(View.VISIBLE); |
122 | - findViewById(R.id.cl_chart_info).findViewById(R.id.analysis_tab4).setVisibility(View.GONE); | ||
123 | - findViewById(R.id.cl_chart_info).findViewById(R.id.analysis_tab5).setVisibility(View.GONE); | ||
124 | } | 86 | } |
125 | } | 87 | } |
126 | } | 88 | } |
... | @@ -135,30 +97,9 @@ public class LoyaltyActivity extends Activity implements View.OnClickListener, | ... | @@ -135,30 +97,9 @@ public class LoyaltyActivity extends Activity implements View.OnClickListener, |
135 | // =========================================================== | 97 | // =========================================================== |
136 | 98 | ||
137 | private void initViews() { | 99 | private void initViews() { |
138 | - if (WarplyManagerHelper.getConsumer() != null) | ||
139 | - mTvUsername.setText(String.format(getResources().getString(R.string.cos_profile_loyalty_name), | ||
140 | - WarplyManagerHelper.getConsumer().getFirstName(), WarplyManagerHelper.getConsumer().getLastName())); | ||
141 | - | ||
142 | mIvBack.setOnClickListener(this); | 100 | mIvBack.setOnClickListener(this); |
143 | mTvAnalysisButton.setOnClickListener(this); | 101 | mTvAnalysisButton.setOnClickListener(this); |
144 | 102 | ||
145 | - mRecyclerCoupons.setLayoutManager(new LinearLayoutManager(this, LinearLayoutManager.HORIZONTAL, false)); | ||
146 | - mAdapterCoupons = new HomeCouponAdapter(this, WarplyManagerHelper.getCouponList()); | ||
147 | - mRecyclerCoupons.setAdapter(mAdapterCoupons); | ||
148 | - mAdapterCoupons.getPositionClicks() | ||
149 | - .doOnNext(coupon -> { | ||
150 | - Intent intent = new Intent(this, CouponInfoActivity.class); | ||
151 | - intent.putExtra("coupon", (Serializable) coupon); | ||
152 | - startActivity(intent); | ||
153 | - }) | ||
154 | - .doOnError(error -> { | ||
155 | - }) | ||
156 | - .subscribe(); | ||
157 | - | ||
158 | - mRecyclerBurntCoupons.setLayoutManager(new LinearLayoutManager(this, LinearLayoutManager.HORIZONTAL, false)); | ||
159 | - mAdapterBurntCoupons = new HomeCouponAdapter(this, WarplyManagerHelper.getCouponList(), true); | ||
160 | - mRecyclerBurntCoupons.setAdapter(mAdapterBurntCoupons); | ||
161 | - | ||
162 | ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(this, | 103 | ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(this, |
163 | R.array.coupons_array, R.layout.spinner_item); | 104 | R.array.coupons_array, R.layout.spinner_item); |
164 | adapter.setDropDownViewResource(R.layout.spinner_dropdown_item_grey); | 105 | adapter.setDropDownViewResource(R.layout.spinner_dropdown_item_grey); |
... | @@ -170,8 +111,6 @@ public class LoyaltyActivity extends Activity implements View.OnClickListener, | ... | @@ -170,8 +111,6 @@ public class LoyaltyActivity extends Activity implements View.OnClickListener, |
170 | adapter2.setDropDownViewResource(R.layout.spinner_dropdown_item_sky_blue); | 111 | adapter2.setDropDownViewResource(R.layout.spinner_dropdown_item_sky_blue); |
171 | mRedemptionSpinner.setAdapter(adapter2); | 112 | mRedemptionSpinner.setAdapter(adapter2); |
172 | mRedemptionSpinner.setOnItemSelectedListener(this); | 113 | mRedemptionSpinner.setOnItemSelectedListener(this); |
173 | - | ||
174 | - mTvQuestionnaire.setOnClickListener(this); | ||
175 | } | 114 | } |
176 | 115 | ||
177 | // =========================================================== | 116 | // =========================================================== | ... | ... |
1 | +package ly.warp.sdk.activities; | ||
2 | + | ||
3 | +import android.app.Activity; | ||
4 | +import android.content.Intent; | ||
5 | +import android.os.Bundle; | ||
6 | +import android.view.View; | ||
7 | +import android.widget.ImageView; | ||
8 | +import android.widget.LinearLayout; | ||
9 | +import android.widget.TextView; | ||
10 | + | ||
11 | +import androidx.constraintlayout.widget.ConstraintLayout; | ||
12 | + | ||
13 | +import ly.warp.sdk.R; | ||
14 | +import ly.warp.sdk.io.models.Campaign; | ||
15 | +import ly.warp.sdk.io.models.CampaignList; | ||
16 | +import ly.warp.sdk.utils.WarplyManagerHelper; | ||
17 | + | ||
18 | + | ||
19 | +public class LoyaltyWallet extends Activity implements View.OnClickListener { | ||
20 | + | ||
21 | + // =========================================================== | ||
22 | + // Constants | ||
23 | + // =========================================================== | ||
24 | + | ||
25 | + // =========================================================== | ||
26 | + // Fields | ||
27 | + // =========================================================== | ||
28 | + | ||
29 | + private ImageView mIvBack; | ||
30 | + private TextView mTvUsername, mTvQuestionnaire, mTvActiveCoupons, | ||
31 | + mTvActiveRewards; | ||
32 | + private ConstraintLayout mClActiveCoupons, mClActiveRewards; | ||
33 | + private LinearLayout mLlAnalysisButton; | ||
34 | + | ||
35 | + // =========================================================== | ||
36 | + // Methods for/from SuperClass/Interfaces | ||
37 | + // =========================================================== | ||
38 | + | ||
39 | + @Override | ||
40 | + public void onCreate(Bundle savedInstanceState) { | ||
41 | + super.onCreate(savedInstanceState); | ||
42 | + setContentView(R.layout.activity_loyalty_wallet); | ||
43 | + | ||
44 | + mIvBack = findViewById(R.id.iv_back); | ||
45 | +// mTvAnalysisButton = findViewById(R.id.rl_analysis_row).findViewById(R.id.cl_chart_info).findViewById(R.id.tv_analysis_details); | ||
46 | + mTvUsername = findViewById(R.id.tv_name); | ||
47 | +// mTvQuestionnaire = findViewById(R.id.cl_loyalty_info_banner).findViewById(R.id.tv_questionnaire); | ||
48 | + mClActiveCoupons = findViewById(R.id.cl_loyalty_coupon); | ||
49 | + mTvActiveCoupons = findViewById(R.id.tv_active_coupons); | ||
50 | + mClActiveRewards = findViewById(R.id.cl_loyalty_rewards); | ||
51 | + mTvActiveRewards = findViewById(R.id.tv_active_rewards); | ||
52 | + mLlAnalysisButton = findViewById(R.id.ll_analysis); | ||
53 | + | ||
54 | + initViews(); | ||
55 | + } | ||
56 | + | ||
57 | + @Override | ||
58 | + public void onResume() { | ||
59 | + super.onResume(); | ||
60 | + } | ||
61 | + | ||
62 | + @Override | ||
63 | + public void onClick(View view) { | ||
64 | + if (view.getId() == R.id.iv_back) { | ||
65 | + onBackPressed(); | ||
66 | + return; | ||
67 | + } | ||
68 | + if (view.getId() == R.id.ll_analysis) { | ||
69 | + Intent intent = new Intent(this, LoyaltyActivity.class); | ||
70 | + startActivity(intent); | ||
71 | + return; | ||
72 | + } | ||
73 | + if (view.getId() == R.id.tv_questionnaire) { | ||
74 | + CampaignList cl = WarplyManagerHelper.getUniqueCampaignList().get("more_for_you"); | ||
75 | + Campaign camp = null; | ||
76 | + if (cl != null) { | ||
77 | + for (Campaign cn : cl) { | ||
78 | + if (cn.getSessionUUID().equals("4fc2865e32bd4d5495a3dfdf1472da7f")) { | ||
79 | + camp = cn; | ||
80 | + break; | ||
81 | + } | ||
82 | + } | ||
83 | + } | ||
84 | + | ||
85 | + if (camp == null) | ||
86 | + return; | ||
87 | + | ||
88 | + startActivity(WarpViewActivity.createIntentFromURL(LoyaltyWallet.this, WarplyManagerHelper.constructCampaignUrl(camp))); | ||
89 | + return; | ||
90 | + } | ||
91 | + if (view.getId() == R.id.cl_loyalty_coupon) { | ||
92 | + Intent intent = new Intent(LoyaltyWallet.this, ActiveCouponsActivity.class); | ||
93 | + intent.putExtra("couponlist", WarplyManagerHelper.getCouponList()); | ||
94 | + startActivity(intent); | ||
95 | + return; | ||
96 | + } | ||
97 | + if (view.getId() == R.id.cl_loyalty_rewards) { | ||
98 | + | ||
99 | + } | ||
100 | + } | ||
101 | + | ||
102 | + // =========================================================== | ||
103 | + // Methods | ||
104 | + // =========================================================== | ||
105 | + | ||
106 | + private void initViews() { | ||
107 | + if (WarplyManagerHelper.getConsumer() != null) | ||
108 | + mTvUsername.setText(String.format(getResources().getString(R.string.cos_profile_loyalty_name), | ||
109 | + WarplyManagerHelper.getConsumer().getFirstName(), WarplyManagerHelper.getConsumer().getLastName())); | ||
110 | + | ||
111 | + mIvBack.setOnClickListener(this); | ||
112 | +// mTvAnalysisButton.setOnClickListener(this); | ||
113 | +// mTvQuestionnaire.setOnClickListener(this); | ||
114 | + mTvActiveCoupons.setText(String.format(getResources().getString(R.string.cos_active_coupons), String.valueOf(WarplyManagerHelper.getCouponList().size()))); | ||
115 | + mClActiveCoupons.setOnClickListener(this); | ||
116 | + //TODO: change the parameter, for testing purposes only | ||
117 | + mTvActiveRewards.setText(String.format(getResources().getString(R.string.cos_active_rewards), String.valueOf(WarplyManagerHelper.getCouponList().size()))); | ||
118 | + mClActiveRewards.setOnClickListener(this); | ||
119 | + mLlAnalysisButton.setOnClickListener(this); | ||
120 | + } | ||
121 | + | ||
122 | + // =========================================================== | ||
123 | + // Inner and Anonymous Classes | ||
124 | + // =========================================================== | ||
125 | + | ||
126 | +} |
... | @@ -16,7 +16,7 @@ import androidx.recyclerview.widget.RecyclerView; | ... | @@ -16,7 +16,7 @@ import androidx.recyclerview.widget.RecyclerView; |
16 | 16 | ||
17 | import ly.warp.sdk.R; | 17 | import ly.warp.sdk.R; |
18 | import ly.warp.sdk.activities.GiftsForYouActivity; | 18 | import ly.warp.sdk.activities.GiftsForYouActivity; |
19 | -import ly.warp.sdk.activities.LoyaltyActivity; | 19 | +import ly.warp.sdk.activities.LoyaltyWallet; |
20 | import ly.warp.sdk.activities.MoreForYouActivity; | 20 | import ly.warp.sdk.activities.MoreForYouActivity; |
21 | import ly.warp.sdk.activities.WarpViewActivity; | 21 | import ly.warp.sdk.activities.WarpViewActivity; |
22 | import ly.warp.sdk.utils.WarplyManagerHelper; | 22 | import ly.warp.sdk.utils.WarplyManagerHelper; |
... | @@ -121,7 +121,7 @@ public class LoyaltyFragment extends Fragment implements View.OnClickListener { | ... | @@ -121,7 +121,7 @@ public class LoyaltyFragment extends Fragment implements View.OnClickListener { |
121 | @Override | 121 | @Override |
122 | public void onClick(View view) { | 122 | public void onClick(View view) { |
123 | if (view.getId() == R.id.cl_rewards_wallet) { | 123 | if (view.getId() == R.id.cl_rewards_wallet) { |
124 | - Intent intent = new Intent(getContext(), LoyaltyActivity.class); | 124 | + Intent intent = new Intent(getContext(), LoyaltyWallet.class); |
125 | startActivity(intent); | 125 | startActivity(intent); |
126 | return; | 126 | return; |
127 | } | 127 | } | ... | ... |
... | @@ -100,15 +100,15 @@ public class CouponsetsAdapter extends RecyclerView.Adapter<CouponsetsAdapter.Co | ... | @@ -100,15 +100,15 @@ public class CouponsetsAdapter extends RecyclerView.Adapter<CouponsetsAdapter.Co |
100 | holder.tvCouponTitle.setText(couponsetItem.getName()); | 100 | holder.tvCouponTitle.setText(couponsetItem.getName()); |
101 | holder.tvCouponDescription.setText(Html.fromHtml(couponsetItem.getDescription())); | 101 | holder.tvCouponDescription.setText(Html.fromHtml(couponsetItem.getDescription())); |
102 | 102 | ||
103 | - String strCurrentDate = couponsetItem.getExpiration(); | 103 | + SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd hh:mm"); |
104 | - SimpleDateFormat format = new SimpleDateFormat("dd/MM/yyyy"); | ||
105 | Date newDate = new Date(); | 104 | Date newDate = new Date(); |
106 | try { | 105 | try { |
107 | - newDate = format.parse(strCurrentDate); | 106 | + newDate = simpleDateFormat.parse(couponsetItem.getExpiration()); |
108 | } catch (ParseException e) { | 107 | } catch (ParseException e) { |
109 | e.printStackTrace(); | 108 | e.printStackTrace(); |
110 | } | 109 | } |
111 | - holder.tvCouponDate.setText(String.format(mContext.getString(R.string.cos_coupon_date), format.format(newDate))); | 110 | + simpleDateFormat = new SimpleDateFormat("dd/MM/yyyy"); |
111 | + holder.tvCouponDate.setText(String.format(mContext.getString(R.string.cos_coupon_date), simpleDateFormat.format(newDate != null ? newDate : ""))); | ||
112 | 112 | ||
113 | holder.tvCouponValue.setText(couponsetItem.getDiscount()); | 113 | holder.tvCouponValue.setText(couponsetItem.getDiscount()); |
114 | holder.itemView.setOnClickListener(v -> onClickSubject.onNext(couponsetItem)); | 114 | holder.itemView.setOnClickListener(v -> onClickSubject.onNext(couponsetItem)); | ... | ... |
... | @@ -101,17 +101,17 @@ public class ActiveCouponAdapter extends RecyclerView.Adapter<ActiveCouponAdapte | ... | @@ -101,17 +101,17 @@ public class ActiveCouponAdapter extends RecyclerView.Adapter<ActiveCouponAdapte |
101 | holder.tvCouponTitle.setText(couponItem.getName()); | 101 | holder.tvCouponTitle.setText(couponItem.getName()); |
102 | holder.tvCouponDescription.setText(couponItem.getDescription()); | 102 | holder.tvCouponDescription.setText(couponItem.getDescription()); |
103 | 103 | ||
104 | - String strCurrentDate = couponItem.getExpiration(); | 104 | + SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd hh:mm"); |
105 | - SimpleDateFormat format = new SimpleDateFormat("dd/MM/yyyy"); | ||
106 | Date newDate = new Date(); | 105 | Date newDate = new Date(); |
107 | try { | 106 | try { |
108 | - newDate = format.parse(strCurrentDate); | 107 | + newDate = simpleDateFormat.parse(couponItem.getExpiration()); |
109 | } catch (ParseException e) { | 108 | } catch (ParseException e) { |
110 | e.printStackTrace(); | 109 | e.printStackTrace(); |
111 | } | 110 | } |
112 | - holder.tvCouponDate.setText(String.format(mContext.getString(R.string.cos_coupon_date), format.format(newDate))); | 111 | + simpleDateFormat = new SimpleDateFormat("dd/MM/yyyy"); |
112 | + holder.tvCouponDate.setText(String.format(mContext.getString(R.string.cos_coupon_date), simpleDateFormat.format(newDate != null ? newDate : ""))); | ||
113 | 113 | ||
114 | - holder.tvCouponValue.setText(couponItem.getDiscount()); | 114 | + holder.tvCouponValue.setText(couponItem.getDiscount() + mContext.getResources().getString(R.string.euro)); |
115 | holder.itemView.setOnClickListener(v -> onClickSubject.onNext(couponItem)); | 115 | holder.itemView.setOnClickListener(v -> onClickSubject.onNext(couponItem)); |
116 | } | 116 | } |
117 | } | 117 | } | ... | ... |
20.9 KB
7.93 KB
... | @@ -3,10 +3,9 @@ | ... | @@ -3,10 +3,9 @@ |
3 | <item> | 3 | <item> |
4 | <shape android:shape="rectangle"> | 4 | <shape android:shape="rectangle"> |
5 | <gradient | 5 | <gradient |
6 | - android:angle="90" | 6 | + android:angle="180" |
7 | - android:endColor="#C4F187" | 7 | + android:endColor="@color/cos_cyan2" |
8 | - android:startColor="#8EF593" /> | 8 | + android:startColor="@color/cos_green7" /> |
9 | - | ||
10 | </shape> | 9 | </shape> |
11 | </item> | 10 | </item> |
12 | 11 | ... | ... |
1 | +<?xml version="1.0" encoding="utf-8"?> | ||
2 | +<selector xmlns:android="http://schemas.android.com/apk/res/android"> | ||
3 | + <item android:drawable="@drawable/shape_cos_grey2_tr" android:state_pressed="true" /> | ||
4 | + <item android:drawable="@drawable/shape_cos_grey2" android:state_pressed="false" /> | ||
5 | +</selector> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | +<?xml version="1.0" encoding="utf-8"?> | ||
2 | +<shape xmlns:android="http://schemas.android.com/apk/res/android" | ||
3 | + android:shape="rectangle"> | ||
4 | + <corners android:radius="7dp" /> | ||
5 | + | ||
6 | + <solid | ||
7 | + android:width="2dp" | ||
8 | + android:color="@color/cos_grey2" /> | ||
9 | +</shape> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | +<?xml version="1.0" encoding="utf-8"?> | ||
2 | +<shape xmlns:android="http://schemas.android.com/apk/res/android" | ||
3 | + android:shape="rectangle"> | ||
4 | + <corners android:radius="7dp" /> | ||
5 | + | ||
6 | + <solid | ||
7 | + android:width="2dp" | ||
8 | + android:color="@color/cos_grey2_tr" /> | ||
9 | +</shape> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | +<?xml version="1.0" encoding="utf-8"?> | ||
2 | +<shape xmlns:android="http://schemas.android.com/apk/res/android" | ||
3 | + android:shape="rectangle"> | ||
4 | + <corners android:radius="11dp" /> | ||
5 | + | ||
6 | + <solid | ||
7 | + android:color="@color/grey_tr3" /> | ||
8 | +</shape> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | +<?xml version="1.0" encoding="utf-8"?> | ||
2 | +<shape xmlns:android="http://schemas.android.com/apk/res/android" | ||
3 | + android:shape="rectangle"> | ||
4 | + <corners android:radius="4dp" /> | ||
5 | + | ||
6 | + <solid android:color="@android:color/white" /> | ||
7 | +</shape> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
... | @@ -2,7 +2,7 @@ | ... | @@ -2,7 +2,7 @@ |
2 | xmlns:app="http://schemas.android.com/apk/res-auto" | 2 | xmlns:app="http://schemas.android.com/apk/res-auto" |
3 | android:layout_width="match_parent" | 3 | android:layout_width="match_parent" |
4 | android:layout_height="match_parent" | 4 | android:layout_height="match_parent" |
5 | - android:background="#F3F3F3"> | 5 | + android:background="@color/grey4"> |
6 | 6 | ||
7 | <androidx.constraintlayout.widget.ConstraintLayout | 7 | <androidx.constraintlayout.widget.ConstraintLayout |
8 | android:id="@+id/cl_loyalty_wallet_header" | 8 | android:id="@+id/cl_loyalty_wallet_header" |
... | @@ -23,7 +23,7 @@ | ... | @@ -23,7 +23,7 @@ |
23 | <TextView | 23 | <TextView |
24 | android:layout_width="wrap_content" | 24 | android:layout_width="wrap_content" |
25 | android:layout_height="wrap_content" | 25 | android:layout_height="wrap_content" |
26 | - android:text="@string/cos_profile_title" | 26 | + android:text="@string/cos_analysis" |
27 | android:textColor="@color/grey" | 27 | android:textColor="@color/grey" |
28 | android:textSize="17sp" | 28 | android:textSize="17sp" |
29 | android:textStyle="bold" | 29 | android:textStyle="bold" |
... | @@ -37,86 +37,43 @@ | ... | @@ -37,86 +37,43 @@ |
37 | android:layout_width="match_parent" | 37 | android:layout_width="match_parent" |
38 | android:layout_height="match_parent" | 38 | android:layout_height="match_parent" |
39 | android:layout_below="@+id/cl_loyalty_wallet_header" | 39 | android:layout_below="@+id/cl_loyalty_wallet_header" |
40 | - android:background="#F3F3F3"> | 40 | + android:background="@color/grey4"> |
41 | 41 | ||
42 | - <androidx.constraintlayout.widget.ConstraintLayout | 42 | + <RelativeLayout |
43 | android:layout_width="match_parent" | 43 | android:layout_width="match_parent" |
44 | android:layout_height="wrap_content" | 44 | android:layout_height="wrap_content" |
45 | - android:background="@android:color/white" | 45 | + android:background="@android:color/white"> |
46 | - android:paddingTop="48dp"> | 46 | + |
47 | + <include | ||
48 | + android:id="@+id/cl_tab_analysis" | ||
49 | + layout="@layout/tab_analysis" | ||
50 | + android:layout_width="match_parent" | ||
51 | + android:layout_height="wrap_content" | ||
52 | + android:layout_marginHorizontal="48dp" | ||
53 | + android:layout_marginVertical="24dp" /> | ||
47 | 54 | ||
48 | <androidx.constraintlayout.widget.ConstraintLayout | 55 | <androidx.constraintlayout.widget.ConstraintLayout |
49 | android:id="@+id/cl_loyalty_info_view_inner" | 56 | android:id="@+id/cl_loyalty_info_view_inner" |
50 | android:layout_width="match_parent" | 57 | android:layout_width="match_parent" |
51 | android:layout_height="match_parent" | 58 | android:layout_height="match_parent" |
59 | + android:layout_below="@+id/cl_tab_analysis" | ||
52 | android:background="@drawable/shape_cos_loyalty" | 60 | android:background="@drawable/shape_cos_loyalty" |
53 | - android:paddingBottom="48dp" | 61 | + android:paddingBottom="24dp" |
54 | app:layout_constraintBottom_toBottomOf="parent" | 62 | app:layout_constraintBottom_toBottomOf="parent" |
55 | app:layout_constraintEnd_toEndOf="parent" | 63 | app:layout_constraintEnd_toEndOf="parent" |
56 | app:layout_constraintStart_toStartOf="parent" | 64 | app:layout_constraintStart_toStartOf="parent" |
57 | app:layout_constraintTop_toTopOf="parent"> | 65 | app:layout_constraintTop_toTopOf="parent"> |
58 | 66 | ||
59 | <include | 67 | <include |
60 | - android:id="@+id/rl_coupons_row" | ||
61 | - layout="@layout/loyalty_coupons" | ||
62 | - android:layout_width="match_parent" | ||
63 | - android:layout_height="wrap_content" | ||
64 | - android:layout_marginTop="110dp" | ||
65 | - app:layout_constraintEnd_toEndOf="parent" | ||
66 | - app:layout_constraintStart_toStartOf="parent" | ||
67 | - app:layout_constraintTop_toTopOf="parent" /> | ||
68 | - | ||
69 | - <include | ||
70 | - android:id="@+id/rl_gifts_row" | ||
71 | - layout="@layout/loyalty_gifts" | ||
72 | - android:layout_width="match_parent" | ||
73 | - android:layout_height="wrap_content" | ||
74 | - android:layout_marginTop="32dp" | ||
75 | - app:layout_constraintEnd_toEndOf="parent" | ||
76 | - app:layout_constraintStart_toStartOf="parent" | ||
77 | - app:layout_constraintTop_toBottomOf="@+id/rl_coupons_row" /> | ||
78 | - | ||
79 | - <include | ||
80 | android:id="@+id/rl_analysis_row" | 68 | android:id="@+id/rl_analysis_row" |
81 | layout="@layout/loyalty_analysis_container" | 69 | layout="@layout/loyalty_analysis_container" |
82 | android:layout_width="match_parent" | 70 | android:layout_width="match_parent" |
83 | android:layout_height="wrap_content" | 71 | android:layout_height="wrap_content" |
84 | - android:layout_marginTop="48dp" | 72 | + android:layout_marginTop="24dp" |
85 | - app:layout_constraintEnd_toEndOf="parent" | ||
86 | - app:layout_constraintStart_toStartOf="parent" | ||
87 | - app:layout_constraintTop_toBottomOf="@+id/rl_gifts_row" /> | ||
88 | - | ||
89 | - <include | ||
90 | - android:id="@+id/rl_burnt_coupons_row" | ||
91 | - layout="@layout/loyalty_burnt_coupons" | ||
92 | - android:layout_width="match_parent" | ||
93 | - android:layout_height="wrap_content" | ||
94 | - android:layout_marginTop="48dp" | ||
95 | app:layout_constraintEnd_toEndOf="parent" | 73 | app:layout_constraintEnd_toEndOf="parent" |
96 | app:layout_constraintStart_toStartOf="parent" | 74 | app:layout_constraintStart_toStartOf="parent" |
97 | - app:layout_constraintTop_toBottomOf="@+id/rl_analysis_row" /> | 75 | + app:layout_constraintTop_toTopOf="parent" /> |
98 | - | ||
99 | - <include | ||
100 | - android:id="@+id/rl_redeemed_gifts_row" | ||
101 | - layout="@layout/loyalty_redeemed_gifts" | ||
102 | - android:layout_width="match_parent" | ||
103 | - android:layout_height="wrap_content" | ||
104 | - android:layout_marginTop="32dp" | ||
105 | - app:layout_constraintEnd_toEndOf="parent" | ||
106 | - app:layout_constraintStart_toStartOf="parent" | ||
107 | - app:layout_constraintTop_toBottomOf="@+id/rl_burnt_coupons_row" /> | ||
108 | </androidx.constraintlayout.widget.ConstraintLayout> | 76 | </androidx.constraintlayout.widget.ConstraintLayout> |
109 | - | 77 | + </RelativeLayout> |
110 | - <include | ||
111 | - android:id="@+id/cl_loyalty_info_banner" | ||
112 | - layout="@layout/loyalty_banner" | ||
113 | - android:layout_width="match_parent" | ||
114 | - android:layout_height="160dp" | ||
115 | - android:layout_marginHorizontal="32dp" | ||
116 | - app:layout_constraintBottom_toTopOf="@+id/cl_loyalty_info_view_inner" | ||
117 | - app:layout_constraintEnd_toEndOf="parent" | ||
118 | - app:layout_constraintStart_toStartOf="parent" | ||
119 | - app:layout_constraintTop_toTopOf="@+id/cl_loyalty_info_view_inner" /> | ||
120 | - </androidx.constraintlayout.widget.ConstraintLayout> | ||
121 | </ScrollView> | 78 | </ScrollView> |
122 | </RelativeLayout> | 79 | </RelativeLayout> | ... | ... |
1 | +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
2 | + xmlns:app="http://schemas.android.com/apk/res-auto" | ||
3 | + xmlns:tools="http://schemas.android.com/tools" | ||
4 | + android:layout_width="match_parent" | ||
5 | + android:layout_height="match_parent" | ||
6 | + android:background="@android:color/white"> | ||
7 | + | ||
8 | + <androidx.constraintlayout.widget.ConstraintLayout | ||
9 | + android:id="@+id/cl_loyalty_wallet_header" | ||
10 | + android:layout_width="match_parent" | ||
11 | + android:layout_height="50dp" | ||
12 | + android:background="@android:color/white"> | ||
13 | + | ||
14 | + <ImageView | ||
15 | + android:id="@+id/iv_back" | ||
16 | + android:layout_width="20dp" | ||
17 | + android:layout_height="20dp" | ||
18 | + android:layout_marginStart="16dp" | ||
19 | + android:src="@drawable/ic_back" | ||
20 | + app:layout_constraintBottom_toBottomOf="parent" | ||
21 | + app:layout_constraintStart_toStartOf="parent" | ||
22 | + app:layout_constraintTop_toTopOf="parent" /> | ||
23 | + | ||
24 | + <TextView | ||
25 | + android:layout_width="wrap_content" | ||
26 | + android:layout_height="wrap_content" | ||
27 | + android:text="@string/cos_profile_title" | ||
28 | + android:textColor="@color/grey" | ||
29 | + android:textSize="17sp" | ||
30 | + android:textStyle="bold" | ||
31 | + app:layout_constraintBottom_toBottomOf="parent" | ||
32 | + app:layout_constraintEnd_toEndOf="parent" | ||
33 | + app:layout_constraintStart_toStartOf="parent" | ||
34 | + app:layout_constraintTop_toTopOf="parent" /> | ||
35 | + </androidx.constraintlayout.widget.ConstraintLayout> | ||
36 | + | ||
37 | + <androidx.constraintlayout.widget.ConstraintLayout | ||
38 | + android:id="@+id/cl_header" | ||
39 | + android:layout_width="match_parent" | ||
40 | + android:layout_height="90dp" | ||
41 | + android:layout_below="@+id/cl_loyalty_wallet_header" | ||
42 | + android:layout_marginVertical="24dp" | ||
43 | + android:paddingHorizontal="24dp"> | ||
44 | + | ||
45 | + <de.hdodenhof.circleimageview.CircleImageView | ||
46 | + android:id="@+id/iv_profile_photo" | ||
47 | + android:layout_width="60dp" | ||
48 | + android:layout_height="60dp" | ||
49 | + android:src="@drawable/profile_photo" | ||
50 | + app:layout_constraintBottom_toBottomOf="parent" | ||
51 | + app:layout_constraintLeft_toLeftOf="parent" | ||
52 | + app:layout_constraintTop_toTopOf="parent" /> | ||
53 | + | ||
54 | + <TextView | ||
55 | + android:id="@+id/tv_name" | ||
56 | + android:layout_width="wrap_content" | ||
57 | + android:layout_height="wrap_content" | ||
58 | + android:layout_marginStart="8dp" | ||
59 | + android:layout_marginTop="6dp" | ||
60 | + android:maxLines="1" | ||
61 | + android:textColor="@color/grey" | ||
62 | + app:layout_constraintLeft_toRightOf="@+id/iv_profile_photo" | ||
63 | + app:layout_constraintTop_toTopOf="@+id/iv_profile_photo" | ||
64 | + tools:text="Test Name" /> | ||
65 | + | ||
66 | + <LinearLayout | ||
67 | + android:layout_width="wrap_content" | ||
68 | + android:layout_height="wrap_content" | ||
69 | + android:layout_marginStart="8dp" | ||
70 | + android:layout_marginBottom="10dp" | ||
71 | + android:background="@drawable/shape_cos_gradient" | ||
72 | + android:gravity="center" | ||
73 | + android:paddingHorizontal="4dp" | ||
74 | + app:layout_constraintBottom_toBottomOf="@+id/iv_profile_photo" | ||
75 | + app:layout_constraintLeft_toRightOf="@+id/iv_profile_photo"> | ||
76 | + | ||
77 | + <TextView | ||
78 | + android:id="@+id/tv_type" | ||
79 | + android:layout_width="wrap_content" | ||
80 | + android:layout_height="wrap_content" | ||
81 | + android:text="@string/cos_profile_type" | ||
82 | + android:textColor="@android:color/white" /> | ||
83 | + </LinearLayout> | ||
84 | + </androidx.constraintlayout.widget.ConstraintLayout> | ||
85 | + | ||
86 | + <ScrollView | ||
87 | + android:layout_width="match_parent" | ||
88 | + android:layout_height="match_parent" | ||
89 | + android:layout_below="@+id/cl_header" | ||
90 | + android:fillViewport="true"> | ||
91 | + | ||
92 | + <RelativeLayout | ||
93 | + android:layout_width="match_parent" | ||
94 | + android:layout_height="wrap_content" | ||
95 | + android:background="@drawable/shape_cos_profile_gradient" | ||
96 | + android:orientation="vertical" | ||
97 | + android:paddingBottom="24dp"> | ||
98 | + | ||
99 | + <androidx.constraintlayout.widget.ConstraintLayout | ||
100 | + android:id="@+id/cl_loyalty_deals" | ||
101 | + android:layout_width="match_parent" | ||
102 | + android:layout_height="160dp" | ||
103 | + android:layout_marginHorizontal="6dp" | ||
104 | + android:layout_marginTop="48dp" | ||
105 | + android:background="@drawable/shape_cos_white2"> | ||
106 | + | ||
107 | + <LinearLayout | ||
108 | + android:layout_width="wrap_content" | ||
109 | + android:layout_height="wrap_content" | ||
110 | + android:layout_marginStart="38dp" | ||
111 | + android:orientation="vertical" | ||
112 | + app:layout_constraintBottom_toBottomOf="parent" | ||
113 | + app:layout_constraintStart_toStartOf="parent" | ||
114 | + app:layout_constraintTop_toTopOf="parent"> | ||
115 | + | ||
116 | + <TextView | ||
117 | + android:id="@+id/tv_active_deals" | ||
118 | + android:layout_width="wrap_content" | ||
119 | + android:layout_height="wrap_content" | ||
120 | + android:text="@string/cos_active_deals" | ||
121 | + android:textColor="@color/blue_dark" | ||
122 | + android:textFontWeight="600" | ||
123 | + android:textSize="18sp" /> | ||
124 | + | ||
125 | + <TextView | ||
126 | + android:id="@+id/tv_active_deals_code" | ||
127 | + android:layout_width="wrap_content" | ||
128 | + android:layout_height="wrap_content" | ||
129 | + android:layout_marginBottom="8dp" | ||
130 | + android:text="961544809" | ||
131 | + android:textColor="@color/blue_dark" | ||
132 | + android:textSize="18sp" | ||
133 | + android:textStyle="bold" /> | ||
134 | + | ||
135 | + <TextView | ||
136 | + android:layout_width="wrap_content" | ||
137 | + android:layout_height="wrap_content" | ||
138 | + android:layout_marginTop="8dp" | ||
139 | + android:text="Λήγει σε 4 ημέρες" | ||
140 | + android:textColor="@color/cos_grey3" | ||
141 | + android:textFontWeight="600" /> | ||
142 | + </LinearLayout> | ||
143 | + | ||
144 | + <ImageView | ||
145 | + android:layout_width="90dp" | ||
146 | + android:layout_height="90dp" | ||
147 | + android:layout_marginEnd="32dp" | ||
148 | + android:src="@drawable/ic_loyalty_deals" | ||
149 | + app:layout_constraintBottom_toBottomOf="parent" | ||
150 | + app:layout_constraintEnd_toEndOf="parent" | ||
151 | + app:layout_constraintTop_toTopOf="parent" /> | ||
152 | + </androidx.constraintlayout.widget.ConstraintLayout> | ||
153 | + | ||
154 | + <androidx.constraintlayout.widget.ConstraintLayout | ||
155 | + android:id="@+id/cl_active_coupons" | ||
156 | + android:layout_width="match_parent" | ||
157 | + android:layout_height="wrap_content" | ||
158 | + android:layout_below="@+id/cl_loyalty_deals" | ||
159 | + android:layout_marginTop="64dp" | ||
160 | + android:paddingBottom="4dp"> | ||
161 | + | ||
162 | + <TextView | ||
163 | + android:id="@+id/tv_coupons_title" | ||
164 | + android:layout_width="wrap_content" | ||
165 | + android:layout_height="wrap_content" | ||
166 | + android:layout_marginStart="10dp" | ||
167 | + android:text="@string/cos_loyalty_coupons" | ||
168 | + android:textColor="@android:color/white" | ||
169 | + android:textSize="18sp" | ||
170 | + android:textStyle="bold" | ||
171 | + app:layout_constraintStart_toStartOf="parent" | ||
172 | + app:layout_constraintTop_toTopOf="parent" /> | ||
173 | + | ||
174 | + <LinearLayout | ||
175 | + android:id="@+id/ll_old_coupons" | ||
176 | + android:layout_width="wrap_content" | ||
177 | + android:layout_height="wrap_content" | ||
178 | + android:gravity="center" | ||
179 | + android:orientation="horizontal" | ||
180 | + app:layout_constraintBottom_toBottomOf="@+id/tv_coupons_title" | ||
181 | + app:layout_constraintEnd_toEndOf="parent" | ||
182 | + app:layout_constraintTop_toTopOf="@+id/tv_coupons_title"> | ||
183 | + | ||
184 | + <TextView | ||
185 | + android:layout_width="wrap_content" | ||
186 | + android:layout_height="wrap_content" | ||
187 | + android:layout_marginEnd="8dp" | ||
188 | + android:text="@string/cos_loyalty_old_coupons" | ||
189 | + android:textColor="@color/white_tr4" | ||
190 | + android:textFontWeight="600" | ||
191 | + android:textSize="16sp" /> | ||
192 | + | ||
193 | + <ImageView | ||
194 | + android:id="@+id/iv_more" | ||
195 | + android:layout_width="20dp" | ||
196 | + android:layout_height="20dp" | ||
197 | + android:layout_marginEnd="24dp" | ||
198 | + android:src="@drawable/ic_arrow_right_white" /> | ||
199 | + </LinearLayout> | ||
200 | + | ||
201 | + <androidx.constraintlayout.widget.ConstraintLayout | ||
202 | + android:id="@+id/cl_loyalty_coupon" | ||
203 | + android:layout_width="match_parent" | ||
204 | + android:layout_height="140dp" | ||
205 | + android:layout_marginTop="16dp" | ||
206 | + android:background="@drawable/ic_coupon_background" | ||
207 | + app:layout_constraintEnd_toEndOf="parent" | ||
208 | + app:layout_constraintStart_toStartOf="parent" | ||
209 | + app:layout_constraintTop_toBottomOf="@+id/tv_coupons_title"> | ||
210 | + | ||
211 | + <LinearLayout | ||
212 | + android:layout_width="wrap_content" | ||
213 | + android:layout_height="wrap_content" | ||
214 | + android:layout_marginStart="40dp" | ||
215 | + android:orientation="vertical" | ||
216 | + app:layout_constraintBottom_toBottomOf="parent" | ||
217 | + app:layout_constraintStart_toStartOf="parent" | ||
218 | + app:layout_constraintTop_toTopOf="parent"> | ||
219 | + | ||
220 | + <TextView | ||
221 | + android:id="@+id/tv_active_coupons" | ||
222 | + android:layout_width="wrap_content" | ||
223 | + android:layout_height="wrap_content" | ||
224 | + android:layout_marginBottom="8dp" | ||
225 | + android:textColor="@color/blue_dark" | ||
226 | + android:textFontWeight="600" | ||
227 | + android:textSize="18sp" | ||
228 | + tools:text="@string/cos_active_coupons" /> | ||
229 | + | ||
230 | + <TextView | ||
231 | + android:layout_width="wrap_content" | ||
232 | + android:layout_height="wrap_content" | ||
233 | + android:layout_marginTop="8dp" | ||
234 | + android:text="@string/cos_see_all" | ||
235 | + android:textColor="@color/blue_dark" /> | ||
236 | + </LinearLayout> | ||
237 | + | ||
238 | + <ImageView | ||
239 | + android:layout_width="90dp" | ||
240 | + android:layout_height="90dp" | ||
241 | + android:layout_marginEnd="32dp" | ||
242 | + android:src="@drawable/ic_gifts_for_you" | ||
243 | + app:layout_constraintBottom_toBottomOf="parent" | ||
244 | + app:layout_constraintEnd_toEndOf="parent" | ||
245 | + app:layout_constraintTop_toTopOf="parent" /> | ||
246 | + </androidx.constraintlayout.widget.ConstraintLayout> | ||
247 | + </androidx.constraintlayout.widget.ConstraintLayout> | ||
248 | + | ||
249 | + <androidx.constraintlayout.widget.ConstraintLayout | ||
250 | + android:id="@+id/cl_cl_active_rewards" | ||
251 | + android:layout_width="match_parent" | ||
252 | + android:layout_height="wrap_content" | ||
253 | + android:layout_below="@+id/cl_active_coupons" | ||
254 | + android:layout_marginTop="64dp" | ||
255 | + android:paddingBottom="4dp"> | ||
256 | + | ||
257 | + <TextView | ||
258 | + android:id="@+id/tv_rewards_title" | ||
259 | + android:layout_width="wrap_content" | ||
260 | + android:layout_height="wrap_content" | ||
261 | + android:layout_marginStart="10dp" | ||
262 | + android:text="@string/cos_loyalty_rewards" | ||
263 | + android:textColor="@android:color/white" | ||
264 | + android:textSize="18sp" | ||
265 | + android:textStyle="bold" | ||
266 | + app:layout_constraintStart_toStartOf="parent" | ||
267 | + app:layout_constraintTop_toTopOf="parent" /> | ||
268 | + | ||
269 | + <LinearLayout | ||
270 | + android:id="@+id/ll_old_rewards" | ||
271 | + android:layout_width="wrap_content" | ||
272 | + android:layout_height="wrap_content" | ||
273 | + android:gravity="center" | ||
274 | + android:orientation="horizontal" | ||
275 | + app:layout_constraintBottom_toBottomOf="@+id/tv_rewards_title" | ||
276 | + app:layout_constraintEnd_toEndOf="parent" | ||
277 | + app:layout_constraintTop_toTopOf="@+id/tv_rewards_title"> | ||
278 | + | ||
279 | + <TextView | ||
280 | + android:layout_width="wrap_content" | ||
281 | + android:layout_height="wrap_content" | ||
282 | + android:layout_marginEnd="8dp" | ||
283 | + android:text="@string/cos_loyalty_old_rewards" | ||
284 | + android:textColor="@color/white_tr4" | ||
285 | + android:textFontWeight="600" | ||
286 | + android:textSize="16sp" /> | ||
287 | + | ||
288 | + <ImageView | ||
289 | + android:id="@+id/iv_more2" | ||
290 | + android:layout_width="20dp" | ||
291 | + android:layout_height="20dp" | ||
292 | + android:layout_marginEnd="24dp" | ||
293 | + android:src="@drawable/ic_arrow_right_white" /> | ||
294 | + </LinearLayout> | ||
295 | + | ||
296 | + <androidx.constraintlayout.widget.ConstraintLayout | ||
297 | + android:id="@+id/cl_loyalty_rewards" | ||
298 | + android:layout_width="match_parent" | ||
299 | + android:layout_height="160dp" | ||
300 | + android:layout_marginHorizontal="6dp" | ||
301 | + android:layout_marginTop="16dp" | ||
302 | + android:background="@drawable/shape_cos_white2" | ||
303 | + app:layout_constraintEnd_toEndOf="parent" | ||
304 | + app:layout_constraintStart_toStartOf="parent" | ||
305 | + app:layout_constraintTop_toBottomOf="@+id/tv_rewards_title"> | ||
306 | + | ||
307 | + <LinearLayout | ||
308 | + android:layout_width="wrap_content" | ||
309 | + android:layout_height="wrap_content" | ||
310 | + android:layout_marginStart="38dp" | ||
311 | + android:orientation="vertical" | ||
312 | + app:layout_constraintBottom_toBottomOf="parent" | ||
313 | + app:layout_constraintStart_toStartOf="parent" | ||
314 | + app:layout_constraintTop_toTopOf="parent"> | ||
315 | + | ||
316 | + <TextView | ||
317 | + android:id="@+id/tv_active_rewards" | ||
318 | + android:layout_width="wrap_content" | ||
319 | + android:layout_height="wrap_content" | ||
320 | + android:layout_marginBottom="8dp" | ||
321 | + android:textColor="@color/blue_dark" | ||
322 | + android:textFontWeight="600" | ||
323 | + android:textSize="18sp" | ||
324 | + tools:text="@string/cos_active_rewards" /> | ||
325 | + | ||
326 | + <TextView | ||
327 | + android:layout_width="wrap_content" | ||
328 | + android:layout_height="wrap_content" | ||
329 | + android:layout_marginTop="8dp" | ||
330 | + android:text="@string/cos_see_all" | ||
331 | + android:textColor="@color/blue_dark" /> | ||
332 | + </LinearLayout> | ||
333 | + | ||
334 | + <ImageView | ||
335 | + android:layout_width="90dp" | ||
336 | + android:layout_height="90dp" | ||
337 | + android:layout_marginEnd="32dp" | ||
338 | + android:src="@drawable/ic_loyalty_rewards" | ||
339 | + app:layout_constraintBottom_toBottomOf="parent" | ||
340 | + app:layout_constraintEnd_toEndOf="parent" | ||
341 | + app:layout_constraintTop_toTopOf="parent" /> | ||
342 | + </androidx.constraintlayout.widget.ConstraintLayout> | ||
343 | + </androidx.constraintlayout.widget.ConstraintLayout> | ||
344 | + | ||
345 | + <LinearLayout | ||
346 | + android:id="@+id/ll_analysis" | ||
347 | + android:layout_width="match_parent" | ||
348 | + android:layout_height="50dp" | ||
349 | + android:layout_below="@+id/cl_cl_active_rewards" | ||
350 | + android:layout_marginHorizontal="32dp" | ||
351 | + android:layout_marginTop="64dp" | ||
352 | + android:layout_marginBottom="32dp" | ||
353 | + android:background="@drawable/selector_button_grey" | ||
354 | + android:gravity="center" | ||
355 | + android:orientation="horizontal"> | ||
356 | + | ||
357 | + <TextView | ||
358 | + android:layout_width="wrap_content" | ||
359 | + android:layout_height="wrap_content" | ||
360 | + android:gravity="center" | ||
361 | + android:text="@string/cos_analysis" | ||
362 | + android:textColor="@color/cos_green6" | ||
363 | + android:textSize="17dp" | ||
364 | + android:textStyle="bold" /> | ||
365 | + </LinearLayout> | ||
366 | + </RelativeLayout> | ||
367 | + </ScrollView> | ||
368 | +</RelativeLayout> |
1 | -<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | 1 | +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" |
2 | xmlns:app="http://schemas.android.com/apk/res-auto" | 2 | xmlns:app="http://schemas.android.com/apk/res-auto" |
3 | android:layout_width="match_parent" | 3 | android:layout_width="match_parent" |
4 | android:layout_height="wrap_content" | 4 | android:layout_height="wrap_content" |
5 | - android:gravity="center_horizontal" | 5 | + android:paddingBottom="24dp"> |
6 | - android:orientation="vertical"> | ||
7 | 6 | ||
8 | - <androidx.constraintlayout.widget.ConstraintLayout | 7 | + <LinearLayout |
9 | - android:id="@+id/analysis_tab" | 8 | + android:id="@+id/ll_analysis_tab" |
10 | - android:layout_width="match_parent" | ||
11 | - android:layout_height="wrap_content"> | ||
12 | - | ||
13 | - <ImageView | ||
14 | - android:id="@+id/iv_chart_icon1" | ||
15 | - android:layout_width="24dp" | ||
16 | - android:layout_height="24dp" | ||
17 | - android:src="@drawable/ic_smile" | ||
18 | - app:layout_constraintBottom_toBottomOf="parent" | ||
19 | - app:layout_constraintStart_toStartOf="parent" | ||
20 | - app:layout_constraintTop_toTopOf="parent" /> | ||
21 | - | ||
22 | - <TextView | ||
23 | - android:layout_width="wrap_content" | ||
24 | - android:layout_height="wrap_content" | ||
25 | - android:layout_marginStart="16dp" | ||
26 | - android:text="Διασκέδαση" | ||
27 | - android:textColor="#4D4C58" | ||
28 | - android:textSize="15sp" | ||
29 | - android:textStyle="bold" | ||
30 | - app:layout_constraintBottom_toBottomOf="parent" | ||
31 | - app:layout_constraintStart_toEndOf="@+id/iv_chart_icon1" | ||
32 | - app:layout_constraintTop_toTopOf="parent" /> | ||
33 | - | ||
34 | - <TextView | ||
35 | - android:layout_width="wrap_content" | ||
36 | - android:layout_height="wrap_content" | ||
37 | - android:text="60%" | ||
38 | - android:textColor="#00CB09" | ||
39 | - android:textSize="17sp" | ||
40 | - android:textStyle="bold" | ||
41 | - app:layout_constraintBottom_toBottomOf="parent" | ||
42 | - app:layout_constraintEnd_toEndOf="parent" | ||
43 | - app:layout_constraintTop_toTopOf="parent" /> | ||
44 | - </androidx.constraintlayout.widget.ConstraintLayout> | ||
45 | - | ||
46 | - <androidx.constraintlayout.widget.ConstraintLayout | ||
47 | - android:id="@+id/analysis_tab2" | ||
48 | android:layout_width="match_parent" | 9 | android:layout_width="match_parent" |
49 | android:layout_height="wrap_content" | 10 | android:layout_height="wrap_content" |
50 | - android:layout_marginVertical="20dp"> | 11 | + android:background="@drawable/shape_cos_grey3" |
51 | - | 12 | + android:orientation="vertical" |
52 | - <ImageView | 13 | + android:padding="24dp"> |
53 | - android:id="@+id/iv_chart_icon2" | 14 | + |
54 | - android:layout_width="24dp" | 15 | + <androidx.constraintlayout.widget.ConstraintLayout |
55 | - android:layout_height="24dp" | 16 | + android:id="@+id/analysis_tab" |
56 | - android:src="@drawable/ic_cart" | 17 | + android:layout_width="match_parent" |
57 | - app:layout_constraintBottom_toBottomOf="parent" | 18 | + android:layout_height="wrap_content"> |
58 | - app:layout_constraintStart_toStartOf="parent" | 19 | + |
59 | - app:layout_constraintTop_toTopOf="parent" /> | 20 | + <ImageView |
60 | - | 21 | + android:id="@+id/iv_chart_icon1" |
61 | - <TextView | 22 | + android:layout_width="24dp" |
62 | - android:layout_width="wrap_content" | 23 | + android:layout_height="24dp" |
24 | + android:src="@drawable/ic_smile" | ||
25 | + app:layout_constraintBottom_toBottomOf="parent" | ||
26 | + app:layout_constraintStart_toStartOf="parent" | ||
27 | + app:layout_constraintTop_toTopOf="parent" /> | ||
28 | + | ||
29 | + <TextView | ||
30 | + android:layout_width="wrap_content" | ||
31 | + android:layout_height="wrap_content" | ||
32 | + android:layout_marginStart="16dp" | ||
33 | + android:text="Διασκέδαση" | ||
34 | + android:textColor="#4D4C58" | ||
35 | + android:textSize="15sp" | ||
36 | + android:textStyle="bold" | ||
37 | + app:layout_constraintBottom_toBottomOf="parent" | ||
38 | + app:layout_constraintStart_toEndOf="@+id/iv_chart_icon1" | ||
39 | + app:layout_constraintTop_toTopOf="parent" /> | ||
40 | + | ||
41 | + <TextView | ||
42 | + android:layout_width="wrap_content" | ||
43 | + android:layout_height="wrap_content" | ||
44 | + android:text="60%" | ||
45 | + android:textColor="#00CB09" | ||
46 | + android:textSize="17sp" | ||
47 | + app:layout_constraintBottom_toBottomOf="parent" | ||
48 | + app:layout_constraintEnd_toEndOf="parent" | ||
49 | + app:layout_constraintTop_toTopOf="parent" /> | ||
50 | + </androidx.constraintlayout.widget.ConstraintLayout> | ||
51 | + | ||
52 | + <androidx.constraintlayout.widget.ConstraintLayout | ||
53 | + android:id="@+id/analysis_tab2" | ||
54 | + android:layout_width="match_parent" | ||
63 | android:layout_height="wrap_content" | 55 | android:layout_height="wrap_content" |
64 | - android:layout_marginStart="16dp" | 56 | + android:layout_below="@+id/analysis_tab" |
65 | - android:text="Supermarket" | 57 | + android:layout_marginVertical="20dp"> |
66 | - android:textColor="#4D4C58" | 58 | + |
67 | - android:textSize="15sp" | 59 | + <ImageView |
68 | - android:textStyle="bold" | 60 | + android:id="@+id/iv_chart_icon2" |
69 | - app:layout_constraintBottom_toBottomOf="parent" | 61 | + android:layout_width="24dp" |
70 | - app:layout_constraintStart_toEndOf="@+id/iv_chart_icon2" | 62 | + android:layout_height="24dp" |
71 | - app:layout_constraintTop_toTopOf="parent" /> | 63 | + android:src="@drawable/ic_cart" |
72 | - | 64 | + app:layout_constraintBottom_toBottomOf="parent" |
73 | - <TextView | 65 | + app:layout_constraintStart_toStartOf="parent" |
74 | - android:layout_width="wrap_content" | 66 | + app:layout_constraintTop_toTopOf="parent" /> |
75 | - android:layout_height="wrap_content" | 67 | + |
76 | - android:text="22%" | 68 | + <TextView |
77 | - android:textColor="#9973F3" | 69 | + android:layout_width="wrap_content" |
78 | - android:textSize="17sp" | 70 | + android:layout_height="wrap_content" |
79 | - android:textStyle="bold" | 71 | + android:layout_marginStart="16dp" |
80 | - app:layout_constraintBottom_toBottomOf="parent" | 72 | + android:text="Supermarket" |
81 | - app:layout_constraintEnd_toEndOf="parent" | 73 | + android:textColor="#4D4C58" |
82 | - app:layout_constraintTop_toTopOf="parent" /> | 74 | + android:textSize="15sp" |
83 | - </androidx.constraintlayout.widget.ConstraintLayout> | 75 | + android:textStyle="bold" |
84 | - | 76 | + app:layout_constraintBottom_toBottomOf="parent" |
85 | - <androidx.constraintlayout.widget.ConstraintLayout | 77 | + app:layout_constraintStart_toEndOf="@+id/iv_chart_icon2" |
86 | - android:id="@+id/analysis_tab3" | 78 | + app:layout_constraintTop_toTopOf="parent" /> |
87 | - android:layout_width="match_parent" | 79 | + |
88 | - android:layout_height="wrap_content"> | 80 | + <TextView |
89 | - | 81 | + android:layout_width="wrap_content" |
90 | - <ImageView | 82 | + android:layout_height="wrap_content" |
91 | - android:id="@+id/iv_chart_icon3" | 83 | + android:text="22%" |
92 | - android:layout_width="24dp" | 84 | + android:textColor="#9973F3" |
93 | - android:layout_height="24dp" | 85 | + android:textSize="17sp" |
94 | - android:src="@drawable/ic_plane" | 86 | + app:layout_constraintBottom_toBottomOf="parent" |
95 | - app:layout_constraintBottom_toBottomOf="parent" | 87 | + app:layout_constraintEnd_toEndOf="parent" |
96 | - app:layout_constraintStart_toStartOf="parent" | 88 | + app:layout_constraintTop_toTopOf="parent" /> |
97 | - app:layout_constraintTop_toTopOf="parent" /> | 89 | + </androidx.constraintlayout.widget.ConstraintLayout> |
98 | - | 90 | + |
99 | - <TextView | 91 | + <androidx.constraintlayout.widget.ConstraintLayout |
100 | - android:layout_width="wrap_content" | 92 | + android:id="@+id/analysis_tab3" |
101 | - android:layout_height="wrap_content" | 93 | + android:layout_width="match_parent" |
102 | - android:layout_marginStart="16dp" | ||
103 | - android:text="Ταξίδια" | ||
104 | - android:textColor="#4D4C58" | ||
105 | - android:textSize="15sp" | ||
106 | - android:textStyle="bold" | ||
107 | - app:layout_constraintBottom_toBottomOf="parent" | ||
108 | - app:layout_constraintStart_toEndOf="@+id/iv_chart_icon3" | ||
109 | - app:layout_constraintTop_toTopOf="parent" /> | ||
110 | - | ||
111 | - <TextView | ||
112 | - android:layout_width="wrap_content" | ||
113 | - android:layout_height="wrap_content" | ||
114 | - android:text="18%" | ||
115 | - android:textColor="#0072C9" | ||
116 | - android:textSize="17sp" | ||
117 | - android:textStyle="bold" | ||
118 | - app:layout_constraintBottom_toBottomOf="parent" | ||
119 | - app:layout_constraintEnd_toEndOf="parent" | ||
120 | - app:layout_constraintTop_toTopOf="parent" /> | ||
121 | - </androidx.constraintlayout.widget.ConstraintLayout> | ||
122 | - | ||
123 | - <androidx.constraintlayout.widget.ConstraintLayout | ||
124 | - android:id="@+id/analysis_tab4" | ||
125 | - android:layout_width="match_parent" | ||
126 | - android:layout_height="wrap_content" | ||
127 | - android:layout_marginVertical="20dp"> | ||
128 | - | ||
129 | - <ImageView | ||
130 | - android:id="@+id/iv_chart_icon4" | ||
131 | - android:layout_width="24dp" | ||
132 | - android:layout_height="24dp" | ||
133 | - android:src="@drawable/ic_food" | ||
134 | - app:layout_constraintBottom_toBottomOf="parent" | ||
135 | - app:layout_constraintStart_toStartOf="parent" | ||
136 | - app:layout_constraintTop_toTopOf="parent" /> | ||
137 | - | ||
138 | - <TextView | ||
139 | - android:layout_width="wrap_content" | ||
140 | - android:layout_height="wrap_content" | ||
141 | - android:layout_marginStart="16dp" | ||
142 | - android:text="Γεύση" | ||
143 | - android:textColor="#4D4C58" | ||
144 | - android:textSize="15sp" | ||
145 | - android:textStyle="bold" | ||
146 | - app:layout_constraintBottom_toBottomOf="parent" | ||
147 | - app:layout_constraintStart_toEndOf="@+id/iv_chart_icon4" | ||
148 | - app:layout_constraintTop_toTopOf="parent" /> | ||
149 | - | ||
150 | - <TextView | ||
151 | - android:layout_width="wrap_content" | ||
152 | - android:layout_height="wrap_content" | ||
153 | - android:text="77%" | ||
154 | - android:textColor="#00CB09" | ||
155 | - android:textSize="17sp" | ||
156 | - android:textStyle="bold" | ||
157 | - app:layout_constraintBottom_toBottomOf="parent" | ||
158 | - app:layout_constraintEnd_toEndOf="parent" | ||
159 | - app:layout_constraintTop_toTopOf="parent" /> | ||
160 | - </androidx.constraintlayout.widget.ConstraintLayout> | ||
161 | - | ||
162 | - <androidx.constraintlayout.widget.ConstraintLayout | ||
163 | - android:id="@+id/analysis_tab5" | ||
164 | - android:layout_width="match_parent" | ||
165 | - android:layout_height="wrap_content" | ||
166 | - android:layout_marginVertical="20dp"> | ||
167 | - | ||
168 | - <ImageView | ||
169 | - android:id="@+id/iv_chart_icon5" | ||
170 | - android:layout_width="24dp" | ||
171 | - android:layout_height="24dp" | ||
172 | - android:src="@drawable/ic_bag" | ||
173 | - app:layout_constraintBottom_toBottomOf="parent" | ||
174 | - app:layout_constraintStart_toStartOf="parent" | ||
175 | - app:layout_constraintTop_toTopOf="parent" /> | ||
176 | - | ||
177 | - <TextView | ||
178 | - android:layout_width="wrap_content" | ||
179 | - android:layout_height="wrap_content" | ||
180 | - android:layout_marginStart="16dp" | ||
181 | - android:text="Shopping" | ||
182 | - android:textColor="#4D4C58" | ||
183 | - android:textSize="15sp" | ||
184 | - android:textStyle="bold" | ||
185 | - app:layout_constraintBottom_toBottomOf="parent" | ||
186 | - app:layout_constraintStart_toEndOf="@+id/iv_chart_icon5" | ||
187 | - app:layout_constraintTop_toTopOf="parent" /> | ||
188 | - | ||
189 | - <TextView | ||
190 | - android:layout_width="wrap_content" | ||
191 | android:layout_height="wrap_content" | 94 | android:layout_height="wrap_content" |
192 | - android:text="23%" | 95 | + android:layout_below="@+id/analysis_tab2"> |
193 | - android:textColor="#0072C9" | 96 | + |
194 | - android:textSize="17sp" | 97 | + <ImageView |
195 | - android:textStyle="bold" | 98 | + android:id="@+id/iv_chart_icon3" |
196 | - app:layout_constraintBottom_toBottomOf="parent" | 99 | + android:layout_width="24dp" |
197 | - app:layout_constraintEnd_toEndOf="parent" | 100 | + android:layout_height="24dp" |
198 | - app:layout_constraintTop_toTopOf="parent" /> | 101 | + android:src="@drawable/ic_plane" |
199 | - </androidx.constraintlayout.widget.ConstraintLayout> | 102 | + app:layout_constraintBottom_toBottomOf="parent" |
103 | + app:layout_constraintStart_toStartOf="parent" | ||
104 | + app:layout_constraintTop_toTopOf="parent" /> | ||
105 | + | ||
106 | + <TextView | ||
107 | + android:layout_width="wrap_content" | ||
108 | + android:layout_height="wrap_content" | ||
109 | + android:layout_marginStart="16dp" | ||
110 | + android:text="Ταξίδια" | ||
111 | + android:textColor="#4D4C58" | ||
112 | + android:textSize="15sp" | ||
113 | + android:textStyle="bold" | ||
114 | + app:layout_constraintBottom_toBottomOf="parent" | ||
115 | + app:layout_constraintStart_toEndOf="@+id/iv_chart_icon3" | ||
116 | + app:layout_constraintTop_toTopOf="parent" /> | ||
117 | + | ||
118 | + <TextView | ||
119 | + android:layout_width="wrap_content" | ||
120 | + android:layout_height="wrap_content" | ||
121 | + android:text="18%" | ||
122 | + android:textColor="#0072C9" | ||
123 | + android:textSize="17sp" | ||
124 | + app:layout_constraintBottom_toBottomOf="parent" | ||
125 | + app:layout_constraintEnd_toEndOf="parent" | ||
126 | + app:layout_constraintTop_toTopOf="parent" /> | ||
127 | + </androidx.constraintlayout.widget.ConstraintLayout> | ||
128 | + </LinearLayout> | ||
200 | 129 | ||
201 | <TextView | 130 | <TextView |
202 | android:id="@+id/tv_analysis_details" | 131 | android:id="@+id/tv_analysis_details" |
203 | android:layout_width="match_parent" | 132 | android:layout_width="match_parent" |
204 | android:layout_height="50dp" | 133 | android:layout_height="50dp" |
134 | + android:layout_below="@+id/ll_analysis_tab" | ||
205 | android:layout_marginHorizontal="16dp" | 135 | android:layout_marginHorizontal="16dp" |
206 | - android:layout_marginTop="48dp" | 136 | + android:layout_marginTop="36dp" |
207 | - android:background="@drawable/shape_cos_gradient" | 137 | + android:background="@drawable/shape_cos_green" |
208 | android:gravity="center" | 138 | android:gravity="center" |
209 | android:paddingHorizontal="64dp" | 139 | android:paddingHorizontal="64dp" |
210 | - android:text="Αναλυτικά" | 140 | + android:text="@string/cos_analysis2" |
211 | android:textColor="@android:color/white" | 141 | android:textColor="@android:color/white" |
212 | android:textSize="16sp" | 142 | android:textSize="16sp" |
213 | android:textStyle="bold" /> | 143 | android:textStyle="bold" /> |
214 | -</LinearLayout> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
144 | +</RelativeLayout> | ||
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
1 | <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | 1 | <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" |
2 | - xmlns:app="http://schemas.android.com/apk/res-auto" | ||
3 | android:layout_width="match_parent" | 2 | android:layout_width="match_parent" |
4 | android:layout_height="wrap_content"> | 3 | android:layout_height="wrap_content"> |
5 | 4 | ||
6 | - <TextView | ||
7 | - android:id="@+id/tv_analysis_loyalty_title" | ||
8 | - android:layout_width="wrap_content" | ||
9 | - android:layout_height="wrap_content" | ||
10 | - android:layout_marginStart="10dp" | ||
11 | - android:text="Ανάλυση" | ||
12 | - android:textColor="@color/grey" | ||
13 | - android:textSize="18sp" | ||
14 | - android:textStyle="bold" /> | ||
15 | - | ||
16 | <RelativeLayout | 5 | <RelativeLayout |
17 | android:layout_width="match_parent" | 6 | android:layout_width="match_parent" |
18 | android:layout_height="wrap_content" | 7 | android:layout_height="wrap_content" |
19 | - android:layout_below="@+id/tv_analysis_loyalty_title" | ||
20 | android:layout_marginHorizontal="16dp" | 8 | android:layout_marginHorizontal="16dp" |
21 | - android:layout_marginTop="24dp" | ||
22 | android:background="@drawable/shape_cos_white" | 9 | android:background="@drawable/shape_cos_white" |
23 | android:paddingHorizontal="16dp" | 10 | android:paddingHorizontal="16dp" |
24 | android:paddingVertical="24dp"> | 11 | android:paddingVertical="24dp"> |
... | @@ -35,18 +22,19 @@ | ... | @@ -35,18 +22,19 @@ |
35 | android:spinnerMode="dropdown" /> | 22 | android:spinnerMode="dropdown" /> |
36 | 23 | ||
37 | <include | 24 | <include |
38 | - android:id="@+id/cl_tab_analysis" | 25 | + android:id="@+id/cl_chart" |
39 | - layout="@layout/tab_analysis" | 26 | + layout="@layout/cos_piechart_conditional_render" |
40 | - android:layout_width="match_parent" | 27 | + android:layout_width="200dp" |
41 | - android:layout_height="wrap_content" | 28 | + android:layout_height="200dp" |
42 | android:layout_below="@+id/sp_coupons" | 29 | android:layout_below="@+id/sp_coupons" |
30 | + android:layout_centerHorizontal="true" | ||
43 | android:layout_marginTop="32dp" /> | 31 | android:layout_marginTop="32dp" /> |
44 | 32 | ||
45 | <Spinner | 33 | <Spinner |
46 | android:id="@+id/sp_redemption" | 34 | android:id="@+id/sp_redemption" |
47 | android:layout_width="match_parent" | 35 | android:layout_width="match_parent" |
48 | android:layout_height="60dp" | 36 | android:layout_height="60dp" |
49 | - android:layout_below="@+id/cl_tab_analysis" | 37 | + android:layout_below="@+id/cl_chart" |
50 | android:layout_centerHorizontal="true" | 38 | android:layout_centerHorizontal="true" |
51 | android:layout_marginTop="32dp" | 39 | android:layout_marginTop="32dp" |
52 | android:background="@drawable/shape_cos_sky_blue" | 40 | android:background="@drawable/shape_cos_sky_blue" |
... | @@ -55,30 +43,12 @@ | ... | @@ -55,30 +43,12 @@ |
55 | android:popupElevation="1dp" | 43 | android:popupElevation="1dp" |
56 | android:spinnerMode="dropdown" /> | 44 | android:spinnerMode="dropdown" /> |
57 | 45 | ||
58 | - <androidx.constraintlayout.widget.ConstraintLayout | 46 | + <include |
47 | + android:id="@+id/cl_chart_info" | ||
48 | + layout="@layout/cos_analysis" | ||
59 | android:layout_width="match_parent" | 49 | android:layout_width="match_parent" |
60 | android:layout_height="wrap_content" | 50 | android:layout_height="wrap_content" |
61 | android:layout_below="@+id/sp_redemption" | 51 | android:layout_below="@+id/sp_redemption" |
62 | - android:layout_marginTop="32dp"> | 52 | + android:layout_marginTop="32dp" /> |
63 | - | ||
64 | - <include | ||
65 | - android:id="@+id/cl_chart" | ||
66 | - layout="@layout/cos_piechart_conditional_render" | ||
67 | - android:layout_width="200dp" | ||
68 | - android:layout_height="200dp" | ||
69 | - app:layout_constraintEnd_toEndOf="parent" | ||
70 | - app:layout_constraintStart_toStartOf="parent" | ||
71 | - app:layout_constraintTop_toTopOf="parent" /> | ||
72 | - | ||
73 | - <include | ||
74 | - android:id="@+id/cl_chart_info" | ||
75 | - layout="@layout/cos_analysis" | ||
76 | - android:layout_width="match_parent" | ||
77 | - android:layout_height="wrap_content" | ||
78 | - android:layout_marginTop="32dp" | ||
79 | - app:layout_constraintEnd_toEndOf="@+id/cl_chart" | ||
80 | - app:layout_constraintStart_toStartOf="parent" | ||
81 | - app:layout_constraintTop_toBottomOf="@+id/cl_chart" /> | ||
82 | - </androidx.constraintlayout.widget.ConstraintLayout> | ||
83 | </RelativeLayout> | 53 | </RelativeLayout> |
84 | </RelativeLayout> | 54 | </RelativeLayout> |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
... | @@ -9,8 +9,8 @@ | ... | @@ -9,8 +9,8 @@ |
9 | android:layout_width="wrap_content" | 9 | android:layout_width="wrap_content" |
10 | android:layout_height="wrap_content" | 10 | android:layout_height="wrap_content" |
11 | android:background="@drawable/bottom_border_gradient" | 11 | android:background="@drawable/bottom_border_gradient" |
12 | - android:text="ΜΗΝΙΑΙΑ" | 12 | + android:text="@string/cos_monthly" |
13 | - android:textColor="@color/grey" | 13 | + android:textColor="@color/cos_cyan3" |
14 | android:textSize="18sp" | 14 | android:textSize="18sp" |
15 | android:textStyle="bold" | 15 | android:textStyle="bold" |
16 | app:layout_constraintBottom_toBottomOf="parent" | 16 | app:layout_constraintBottom_toBottomOf="parent" |
... | @@ -23,7 +23,7 @@ | ... | @@ -23,7 +23,7 @@ |
23 | android:layout_width="wrap_content" | 23 | android:layout_width="wrap_content" |
24 | android:layout_height="wrap_content" | 24 | android:layout_height="wrap_content" |
25 | android:background="@drawable/bottom_border_transparent" | 25 | android:background="@drawable/bottom_border_transparent" |
26 | - android:text="6ΜΗΝΟ" | 26 | + android:text="@string/cos_six_months" |
27 | android:textColor="@color/grey" | 27 | android:textColor="@color/grey" |
28 | android:textSize="18sp" | 28 | android:textSize="18sp" |
29 | android:textStyle="bold" | 29 | android:textStyle="bold" |
... | @@ -37,7 +37,7 @@ | ... | @@ -37,7 +37,7 @@ |
37 | android:layout_width="wrap_content" | 37 | android:layout_width="wrap_content" |
38 | android:layout_height="wrap_content" | 38 | android:layout_height="wrap_content" |
39 | android:background="@drawable/bottom_border_transparent" | 39 | android:background="@drawable/bottom_border_transparent" |
40 | - android:text="12ΜΗΝΟ" | 40 | + android:text="@string/cos_annual" |
41 | android:textColor="@color/grey" | 41 | android:textColor="@color/grey" |
42 | android:textSize="18sp" | 42 | android:textSize="18sp" |
43 | android:textStyle="bold" | 43 | android:textStyle="bold" | ... | ... |
... | @@ -27,4 +27,14 @@ | ... | @@ -27,4 +27,14 @@ |
27 | <color name="cos_green5">#79BF14</color> | 27 | <color name="cos_green5">#79BF14</color> |
28 | <color name="cos_green5_tr">#6679BF14</color> | 28 | <color name="cos_green5_tr">#6679BF14</color> |
29 | <color name="blue_dark">#3A5266</color> | 29 | <color name="blue_dark">#3A5266</color> |
30 | + <color name="white_tr4">#A1FFFFFF</color> | ||
31 | + <color name="cos_green6">#509E2F</color> | ||
32 | + <color name="cos_grey2">#E6E6E6</color> | ||
33 | + <color name="cos_grey2_tr">#66E6E6E6</color> | ||
34 | + <color name="cos_grey3">#84929E</color> | ||
35 | + <color name="cos_cyan2">#6DBCC0</color> | ||
36 | + <color name="cos_green7">#B2CF81</color> | ||
37 | + <color name="cos_cyan3">#2EB2B9</color> | ||
38 | + <color name="grey4">#F3F3F3</color> | ||
39 | + <color name="grey_tr3">#7DF2F2F2</color> | ||
30 | </resources> | 40 | </resources> |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
... | @@ -41,6 +41,19 @@ | ... | @@ -41,6 +41,19 @@ |
41 | <string name="cos_dlg_error_subtitle">Κάτι πήγε στραβά</string> | 41 | <string name="cos_dlg_error_subtitle">Κάτι πήγε στραβά</string> |
42 | <string name="cos_dlg_error_subtitle_non_buyable">Το κουπόνι δεν είναι διαθέσιμο για αγορά</string> | 42 | <string name="cos_dlg_error_subtitle_non_buyable">Το κουπόνι δεν είναι διαθέσιμο για αγορά</string> |
43 | <string name="cos_dlg_error_subtitle_no_points">Δεν έχεις αρκετούς πόντους</string> | 43 | <string name="cos_dlg_error_subtitle_no_points">Δεν έχεις αρκετούς πόντους</string> |
44 | + <string name="cos_loyalty_coupons">My coupons</string> | ||
45 | + <string name="cos_loyalty_old_coupons">Παλαιότερα κουπόνια</string> | ||
46 | + <string name="cos_loyalty_rewards">My rewards</string> | ||
47 | + <string name="cos_loyalty_old_rewards">Παλαιότερα δώρα</string> | ||
48 | + <string name="cos_see_all">Δες τα όλα -></string> | ||
49 | + <string name="cos_active_rewards">Έχεις %1$s ενεργά\nδώρα</string> | ||
50 | + <string name="cos_analysis">Ανάλυση</string> | ||
51 | + <string name="cos_active_deals">Ενεργός κωδικός:</string> | ||
52 | + <string name="cos_monthly">Μηνιαία</string> | ||
53 | + <string name="cos_six_months">6Μηνο</string> | ||
54 | + <string name="cos_annual">12Μηνο</string> | ||
55 | + <string name="cos_analysis2">Αναλυτικά</string> | ||
56 | + <string name="euro">€</string> | ||
44 | 57 | ||
45 | <string-array name="coupons_array"> | 58 | <string-array name="coupons_array"> |
46 | <item>Κουπόνια</item> | 59 | <item>Κουπόνια</item> | ... | ... |
-
Please register or login to post a comment