Showing
25 changed files
with
856 additions
and
35 deletions
... | @@ -52,6 +52,16 @@ | ... | @@ -52,6 +52,16 @@ |
52 | android:screenOrientation="portrait" /> | 52 | android:screenOrientation="portrait" /> |
53 | 53 | ||
54 | <activity | 54 | <activity |
55 | + android:name="ly.warp.sdk.activities.ActiveRewardsActivity" | ||
56 | + android:exported="false" | ||
57 | + android:screenOrientation="portrait" /> | ||
58 | + | ||
59 | + <activity | ||
60 | + android:name="ly.warp.sdk.activities.PastCouponsActivity" | ||
61 | + android:exported="false" | ||
62 | + android:screenOrientation="portrait" /> | ||
63 | + | ||
64 | + <activity | ||
55 | android:name="ly.warp.sdk.activities.GiftsForYouActivity" | 65 | android:name="ly.warp.sdk.activities.GiftsForYouActivity" |
56 | android:exported="false" | 66 | android:exported="false" |
57 | android:screenOrientation="portrait" /> | 67 | android:screenOrientation="portrait" /> | ... | ... |
... | @@ -13,8 +13,9 @@ import androidx.recyclerview.widget.RecyclerView; | ... | @@ -13,8 +13,9 @@ import androidx.recyclerview.widget.RecyclerView; |
13 | import java.io.Serializable; | 13 | import java.io.Serializable; |
14 | 14 | ||
15 | import ly.warp.sdk.R; | 15 | import ly.warp.sdk.R; |
16 | +import ly.warp.sdk.io.models.Coupon; | ||
16 | import ly.warp.sdk.io.models.CouponList; | 17 | import ly.warp.sdk.io.models.CouponList; |
17 | -import ly.warp.sdk.views.adapters.mix.ActiveCouponAdapter; | 18 | +import ly.warp.sdk.views.adapters.ActiveCouponAdapter; |
18 | 19 | ||
19 | 20 | ||
20 | public class ActiveCouponsActivity extends Activity implements View.OnClickListener { | 21 | public class ActiveCouponsActivity extends Activity implements View.OnClickListener { |
... | @@ -44,6 +45,13 @@ public class ActiveCouponsActivity extends Activity implements View.OnClickListe | ... | @@ -44,6 +45,13 @@ public class ActiveCouponsActivity extends Activity implements View.OnClickListe |
44 | 45 | ||
45 | if (getIntent().getExtras() != null && getIntent().getSerializableExtra("couponlist") != null) { | 46 | if (getIntent().getExtras() != null && getIntent().getSerializableExtra("couponlist") != null) { |
46 | mCouponList = new CouponList(getIntent().getSerializableExtra("couponlist").toString(), true); | 47 | mCouponList = new CouponList(getIntent().getSerializableExtra("couponlist").toString(), true); |
48 | + CouponList cpnlist = new CouponList(); | ||
49 | + for (Coupon cpn : mCouponList) { | ||
50 | + if (cpn.getStatus() == 1) | ||
51 | + cpnlist.add(cpn); | ||
52 | + } | ||
53 | + mCouponList.clear(); | ||
54 | + mCouponList.addAll(cpnlist); | ||
47 | } | 55 | } |
48 | 56 | ||
49 | mIvBack = findViewById(R.id.iv_coupons_close); | 57 | mIvBack = findViewById(R.id.iv_coupons_close); | ... | ... |
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.TextView; | ||
9 | + | ||
10 | +import androidx.recyclerview.widget.LinearLayoutManager; | ||
11 | +import androidx.recyclerview.widget.RecyclerView; | ||
12 | + | ||
13 | +import java.io.Serializable; | ||
14 | + | ||
15 | +import ly.warp.sdk.R; | ||
16 | +import ly.warp.sdk.io.models.Coupon; | ||
17 | +import ly.warp.sdk.io.models.CouponList; | ||
18 | +import ly.warp.sdk.views.adapters.ActiveRewardAdapter; | ||
19 | + | ||
20 | + | ||
21 | +public class ActiveRewardsActivity extends Activity implements View.OnClickListener { | ||
22 | + | ||
23 | + // =========================================================== | ||
24 | + // Constants | ||
25 | + // =========================================================== | ||
26 | + | ||
27 | + // =========================================================== | ||
28 | + // Fields | ||
29 | + // =========================================================== | ||
30 | + | ||
31 | + private ImageView mIvBack; | ||
32 | + private RecyclerView mRecyclerRewards; | ||
33 | + private ActiveRewardAdapter mAdapterRewards; | ||
34 | + private CouponList mRewardList = new CouponList(); | ||
35 | + private TextView mTvEmptyRewards; | ||
36 | + | ||
37 | + // =========================================================== | ||
38 | + // Methods for/from SuperClass/Interfaces | ||
39 | + // =========================================================== | ||
40 | + | ||
41 | + @Override | ||
42 | + public void onCreate(Bundle savedInstanceState) { | ||
43 | + super.onCreate(savedInstanceState); | ||
44 | + setContentView(R.layout.activity_active_rewards); | ||
45 | + | ||
46 | + if (getIntent().getExtras() != null && getIntent().getSerializableExtra("couponlist") != null) { | ||
47 | + mRewardList = new CouponList(getIntent().getSerializableExtra("couponlist").toString(), true); | ||
48 | + CouponList cpnlist = new CouponList(); | ||
49 | + for (Coupon cpn : mRewardList) { | ||
50 | + if (cpn.getStatus() == 1) | ||
51 | + cpnlist.add(cpn); | ||
52 | + } | ||
53 | + mRewardList.clear(); | ||
54 | + mRewardList.addAll(cpnlist); | ||
55 | + } | ||
56 | + | ||
57 | + mIvBack = findViewById(R.id.iv_coupons_close); | ||
58 | + mTvEmptyRewards = findViewById(R.id.tv_no_rewards); | ||
59 | + | ||
60 | + if (mRewardList != null) { | ||
61 | + mRecyclerRewards = findViewById(R.id.rv_active_rewards); | ||
62 | + mRecyclerRewards.setLayoutManager(new LinearLayoutManager(this, LinearLayoutManager.VERTICAL, false)); | ||
63 | + mAdapterRewards = new ActiveRewardAdapter(this, mRewardList); | ||
64 | + mRecyclerRewards.setAdapter(mAdapterRewards); | ||
65 | + mAdapterRewards.getPositionClicks() | ||
66 | + .doOnNext(coupon -> { | ||
67 | + Intent intent = new Intent(ActiveRewardsActivity.this, CouponInfoActivity.class); | ||
68 | + intent.putExtra("coupon", (Serializable) coupon); | ||
69 | + startActivity(intent); | ||
70 | + }) | ||
71 | + .doOnError(error -> { | ||
72 | + }) | ||
73 | + .subscribe(); | ||
74 | + } else { | ||
75 | + mTvEmptyRewards.setVisibility(View.VISIBLE); | ||
76 | + } | ||
77 | + | ||
78 | + initViews(); | ||
79 | + } | ||
80 | + | ||
81 | + @Override | ||
82 | + public void onResume() { | ||
83 | + super.onResume(); | ||
84 | + } | ||
85 | + | ||
86 | + @Override | ||
87 | + public void onClick(View view) { | ||
88 | + if (view.getId() == R.id.iv_coupons_close) { | ||
89 | + onBackPressed(); | ||
90 | + } | ||
91 | + } | ||
92 | + | ||
93 | + // =========================================================== | ||
94 | + // Methods | ||
95 | + // =========================================================== | ||
96 | + | ||
97 | + private void initViews() { | ||
98 | + mIvBack.setOnClickListener(this); | ||
99 | + } | ||
100 | + | ||
101 | + // =========================================================== | ||
102 | + // Inner and Anonymous Classes | ||
103 | + // =========================================================== | ||
104 | + | ||
105 | +} |
... | @@ -25,7 +25,7 @@ public class LoyaltyActivity extends Activity implements View.OnClickListener, | ... | @@ -25,7 +25,7 @@ public class LoyaltyActivity extends Activity implements View.OnClickListener, |
25 | // =========================================================== | 25 | // =========================================================== |
26 | 26 | ||
27 | private ImageView mIvBack; | 27 | private ImageView mIvBack; |
28 | - private Spinner mCouponSpinner, mRedemptionSpinner; | 28 | + private Spinner mCouponSpinner, mRedemptionSpinner, mCollectionSpinner; |
29 | private TextView mTvAnalysisButton; | 29 | private TextView mTvAnalysisButton; |
30 | 30 | ||
31 | // =========================================================== | 31 | // =========================================================== |
... | @@ -40,6 +40,7 @@ public class LoyaltyActivity extends Activity implements View.OnClickListener, | ... | @@ -40,6 +40,7 @@ public class LoyaltyActivity extends Activity implements View.OnClickListener, |
40 | mIvBack = findViewById(R.id.iv_back); | 40 | mIvBack = findViewById(R.id.iv_back); |
41 | mCouponSpinner = findViewById(R.id.sp_coupons); | 41 | mCouponSpinner = findViewById(R.id.sp_coupons); |
42 | mRedemptionSpinner = findViewById(R.id.sp_redemption); | 42 | mRedemptionSpinner = findViewById(R.id.sp_redemption); |
43 | + mCollectionSpinner = findViewById(R.id.sp_collection); | ||
43 | mTvAnalysisButton = findViewById(R.id.rl_analysis_row).findViewById(R.id.cl_chart_info).findViewById(R.id.tv_analysis_details); | 44 | mTvAnalysisButton = findViewById(R.id.rl_analysis_row).findViewById(R.id.cl_chart_info).findViewById(R.id.tv_analysis_details); |
44 | 45 | ||
45 | initViews(); | 46 | initViews(); |
... | @@ -69,20 +70,26 @@ public class LoyaltyActivity extends Activity implements View.OnClickListener, | ... | @@ -69,20 +70,26 @@ public class LoyaltyActivity extends Activity implements View.OnClickListener, |
69 | if (parent.getId() == mCouponSpinner.getId()) { | 70 | if (parent.getId() == mCouponSpinner.getId()) { |
70 | if (pos == 1) { | 71 | if (pos == 1) { |
71 | mRedemptionSpinner.setVisibility(View.GONE); | 72 | mRedemptionSpinner.setVisibility(View.GONE); |
73 | + mCollectionSpinner.setVisibility(View.VISIBLE); | ||
72 | findViewById(R.id.cl_tab_analysis).setVisibility(View.GONE); | 74 | findViewById(R.id.cl_tab_analysis).setVisibility(View.GONE); |
73 | - findViewById(R.id.cl_chart).findViewById(R.id.cl_inner_chart).setVisibility(View.GONE); | 75 | + ImageView piechart = findViewById(R.id.rl_analysis_row).findViewById(R.id.cl_chart).findViewById(R.id.cl_inner_chart).findViewById(R.id.iv_chart); |
74 | - findViewById(R.id.cl_chart).findViewById(R.id.cl_inner_chart2).setVisibility(View.VISIBLE); | 76 | + piechart.setImageResource(R.drawable.ic_chart_collection); |
75 | findViewById(R.id.cl_chart_info).findViewById(R.id.analysis_tab).setVisibility(View.GONE); | 77 | findViewById(R.id.cl_chart_info).findViewById(R.id.analysis_tab).setVisibility(View.GONE); |
76 | findViewById(R.id.cl_chart_info).findViewById(R.id.analysis_tab2).setVisibility(View.GONE); | 78 | findViewById(R.id.cl_chart_info).findViewById(R.id.analysis_tab2).setVisibility(View.GONE); |
77 | findViewById(R.id.cl_chart_info).findViewById(R.id.analysis_tab3).setVisibility(View.GONE); | 79 | findViewById(R.id.cl_chart_info).findViewById(R.id.analysis_tab3).setVisibility(View.GONE); |
80 | + findViewById(R.id.cl_chart_info).findViewById(R.id.analysis_tab4).setVisibility(View.VISIBLE); | ||
81 | + findViewById(R.id.cl_chart_info).findViewById(R.id.analysis_tab5).setVisibility(View.VISIBLE); | ||
78 | } else { | 82 | } else { |
79 | mRedemptionSpinner.setVisibility(View.VISIBLE); | 83 | mRedemptionSpinner.setVisibility(View.VISIBLE); |
80 | - findViewById(R.id.cl_chart).findViewById(R.id.cl_inner_chart).setVisibility(View.VISIBLE); | 84 | + mCollectionSpinner.setVisibility(View.GONE); |
81 | - findViewById(R.id.cl_chart).findViewById(R.id.cl_inner_chart2).setVisibility(View.GONE); | 85 | + ImageView piechart = findViewById(R.id.rl_analysis_row).findViewById(R.id.cl_chart).findViewById(R.id.cl_inner_chart).findViewById(R.id.iv_chart); |
86 | + piechart.setImageResource(R.drawable.ic_chart); | ||
82 | findViewById(R.id.cl_tab_analysis).setVisibility(View.VISIBLE); | 87 | findViewById(R.id.cl_tab_analysis).setVisibility(View.VISIBLE); |
83 | findViewById(R.id.cl_chart_info).findViewById(R.id.analysis_tab).setVisibility(View.VISIBLE); | 88 | findViewById(R.id.cl_chart_info).findViewById(R.id.analysis_tab).setVisibility(View.VISIBLE); |
84 | findViewById(R.id.cl_chart_info).findViewById(R.id.analysis_tab2).setVisibility(View.VISIBLE); | 89 | findViewById(R.id.cl_chart_info).findViewById(R.id.analysis_tab2).setVisibility(View.VISIBLE); |
85 | findViewById(R.id.cl_chart_info).findViewById(R.id.analysis_tab3).setVisibility(View.VISIBLE); | 90 | findViewById(R.id.cl_chart_info).findViewById(R.id.analysis_tab3).setVisibility(View.VISIBLE); |
91 | + findViewById(R.id.cl_chart_info).findViewById(R.id.analysis_tab4).setVisibility(View.GONE); | ||
92 | + findViewById(R.id.cl_chart_info).findViewById(R.id.analysis_tab5).setVisibility(View.GONE); | ||
86 | } | 93 | } |
87 | } | 94 | } |
88 | } | 95 | } |
... | @@ -111,6 +118,12 @@ public class LoyaltyActivity extends Activity implements View.OnClickListener, | ... | @@ -111,6 +118,12 @@ public class LoyaltyActivity extends Activity implements View.OnClickListener, |
111 | adapter2.setDropDownViewResource(R.layout.spinner_dropdown_item_sky_blue); | 118 | adapter2.setDropDownViewResource(R.layout.spinner_dropdown_item_sky_blue); |
112 | mRedemptionSpinner.setAdapter(adapter2); | 119 | mRedemptionSpinner.setAdapter(adapter2); |
113 | mRedemptionSpinner.setOnItemSelectedListener(this); | 120 | mRedemptionSpinner.setOnItemSelectedListener(this); |
121 | + | ||
122 | + ArrayAdapter<CharSequence> adapter3 = ArrayAdapter.createFromResource(this, | ||
123 | + R.array.collection_array, R.layout.spinner_item); | ||
124 | + adapter3.setDropDownViewResource(R.layout.spinner_dropdown_item_sky_blue); | ||
125 | + mCollectionSpinner.setAdapter(adapter3); | ||
126 | + mCollectionSpinner.setOnItemSelectedListener(this); | ||
114 | } | 127 | } |
115 | 128 | ||
116 | // =========================================================== | 129 | // =========================================================== | ... | ... |
... | @@ -30,7 +30,8 @@ public class LoyaltyWallet extends Activity implements View.OnClickListener { | ... | @@ -30,7 +30,8 @@ public class LoyaltyWallet extends Activity implements View.OnClickListener { |
30 | private TextView mTvUsername, mTvActiveCoupons, | 30 | private TextView mTvUsername, mTvActiveCoupons, |
31 | mTvActiveRewards, mTvUserBadge; | 31 | mTvActiveRewards, mTvUserBadge; |
32 | private ConstraintLayout mClActiveCoupons, mClActiveRewards; | 32 | private ConstraintLayout mClActiveCoupons, mClActiveRewards; |
33 | - private LinearLayout mLlAnalysisButton, mLlQuestionnaire, mLlUserBadge; | 33 | + private LinearLayout mLlAnalysisButton, mLlQuestionnaire, mLlUserBadge, |
34 | + mLlPastCoupons; | ||
34 | 35 | ||
35 | // =========================================================== | 36 | // =========================================================== |
36 | // Methods for/from SuperClass/Interfaces | 37 | // Methods for/from SuperClass/Interfaces |
... | @@ -52,6 +53,7 @@ public class LoyaltyWallet extends Activity implements View.OnClickListener { | ... | @@ -52,6 +53,7 @@ public class LoyaltyWallet extends Activity implements View.OnClickListener { |
52 | mTvActiveRewards = findViewById(R.id.tv_active_rewards); | 53 | mTvActiveRewards = findViewById(R.id.tv_active_rewards); |
53 | mLlAnalysisButton = findViewById(R.id.ll_analysis); | 54 | mLlAnalysisButton = findViewById(R.id.ll_analysis); |
54 | mTvUserBadge = findViewById(R.id.tv_type); | 55 | mTvUserBadge = findViewById(R.id.tv_type); |
56 | + mLlPastCoupons = findViewById(R.id.ll_old_coupons); | ||
55 | 57 | ||
56 | initViews(); | 58 | initViews(); |
57 | } | 59 | } |
... | @@ -97,7 +99,15 @@ public class LoyaltyWallet extends Activity implements View.OnClickListener { | ... | @@ -97,7 +99,15 @@ public class LoyaltyWallet extends Activity implements View.OnClickListener { |
97 | return; | 99 | return; |
98 | } | 100 | } |
99 | if (view.getId() == R.id.cl_loyalty_rewards) { | 101 | if (view.getId() == R.id.cl_loyalty_rewards) { |
100 | - | 102 | + Intent intent = new Intent(LoyaltyWallet.this, ActiveRewardsActivity.class); |
103 | + intent.putExtra("couponlist", WarplyManagerHelper.getCouponList()); | ||
104 | + startActivity(intent); | ||
105 | + return; | ||
106 | + } | ||
107 | + if (view.getId() == R.id.ll_old_coupons) { | ||
108 | + Intent intent = new Intent(LoyaltyWallet.this, PastCouponsActivity.class); | ||
109 | + intent.putExtra("couponlist", WarplyManagerHelper.getCouponList()); | ||
110 | + startActivity(intent); | ||
101 | } | 111 | } |
102 | } | 112 | } |
103 | 113 | ||
... | @@ -131,6 +141,7 @@ public class LoyaltyWallet extends Activity implements View.OnClickListener { | ... | @@ -131,6 +141,7 @@ public class LoyaltyWallet extends Activity implements View.OnClickListener { |
131 | mTvActiveRewards.setText(String.format(getResources().getString(R.string.cos_active_rewards), String.valueOf(WarplyManagerHelper.getCouponList().size()))); | 141 | mTvActiveRewards.setText(String.format(getResources().getString(R.string.cos_active_rewards), String.valueOf(WarplyManagerHelper.getCouponList().size()))); |
132 | mClActiveRewards.setOnClickListener(this); | 142 | mClActiveRewards.setOnClickListener(this); |
133 | mLlAnalysisButton.setOnClickListener(this); | 143 | mLlAnalysisButton.setOnClickListener(this); |
144 | + mLlPastCoupons.setOnClickListener(this); | ||
134 | } | 145 | } |
135 | 146 | ||
136 | // =========================================================== | 147 | // =========================================================== | ... | ... |
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.TextView; | ||
9 | + | ||
10 | +import androidx.recyclerview.widget.LinearLayoutManager; | ||
11 | +import androidx.recyclerview.widget.RecyclerView; | ||
12 | + | ||
13 | +import java.io.Serializable; | ||
14 | + | ||
15 | +import ly.warp.sdk.R; | ||
16 | +import ly.warp.sdk.io.models.Coupon; | ||
17 | +import ly.warp.sdk.io.models.CouponList; | ||
18 | +import ly.warp.sdk.views.adapters.ActiveCouponAdapter; | ||
19 | + | ||
20 | + | ||
21 | +public class PastCouponsActivity extends Activity implements View.OnClickListener { | ||
22 | + | ||
23 | + // =========================================================== | ||
24 | + // Constants | ||
25 | + // =========================================================== | ||
26 | + | ||
27 | + // =========================================================== | ||
28 | + // Fields | ||
29 | + // =========================================================== | ||
30 | + | ||
31 | + private ImageView mIvBack; | ||
32 | + private RecyclerView mRecyclerCoupons; | ||
33 | + private ActiveCouponAdapter mAdapterCoupons; | ||
34 | + private CouponList mCouponList = new CouponList(); | ||
35 | + private TextView mTvEmptyCoupons; | ||
36 | + | ||
37 | + // =========================================================== | ||
38 | + // Methods for/from SuperClass/Interfaces | ||
39 | + // =========================================================== | ||
40 | + | ||
41 | + @Override | ||
42 | + public void onCreate(Bundle savedInstanceState) { | ||
43 | + super.onCreate(savedInstanceState); | ||
44 | + setContentView(R.layout.activity_past_coupons); | ||
45 | + | ||
46 | + if (getIntent().getExtras() != null && getIntent().getSerializableExtra("couponlist") != null) { | ||
47 | + mCouponList = new CouponList(getIntent().getSerializableExtra("couponlist").toString(), true); | ||
48 | + CouponList cpnlist = new CouponList(); | ||
49 | + for (Coupon cpn : mCouponList) { | ||
50 | + if (cpn.getStatus() == 1) | ||
51 | + cpnlist.add(cpn); | ||
52 | + } | ||
53 | + mCouponList.clear(); | ||
54 | + mCouponList.addAll(cpnlist); | ||
55 | + } | ||
56 | + | ||
57 | + mIvBack = findViewById(R.id.iv_coupons_close); | ||
58 | + mTvEmptyCoupons = findViewById(R.id.tv_no_coupons); | ||
59 | + | ||
60 | + if (mCouponList != null) { | ||
61 | + mRecyclerCoupons = findViewById(R.id.rv_active_coupons); | ||
62 | + mRecyclerCoupons.setLayoutManager(new LinearLayoutManager(this, LinearLayoutManager.VERTICAL, false)); | ||
63 | + mAdapterCoupons = new ActiveCouponAdapter(this, mCouponList, true); | ||
64 | + mRecyclerCoupons.setAdapter(mAdapterCoupons); | ||
65 | + mAdapterCoupons.getPositionClicks() | ||
66 | + .doOnNext(coupon -> { | ||
67 | +// Intent intent = new Intent(PastCouponsActivity.this, CouponInfoActivity.class); | ||
68 | +// intent.putExtra("coupon", (Serializable) coupon); | ||
69 | +// startActivity(intent); | ||
70 | + }) | ||
71 | + .doOnError(error -> { | ||
72 | + }) | ||
73 | + .subscribe(); | ||
74 | + } else { | ||
75 | + mTvEmptyCoupons.setVisibility(View.VISIBLE); | ||
76 | + } | ||
77 | + | ||
78 | + initViews(); | ||
79 | + } | ||
80 | + | ||
81 | + @Override | ||
82 | + public void onResume() { | ||
83 | + super.onResume(); | ||
84 | + } | ||
85 | + | ||
86 | + @Override | ||
87 | + public void onClick(View view) { | ||
88 | + if (view.getId() == R.id.iv_coupons_close) { | ||
89 | + onBackPressed(); | ||
90 | + } | ||
91 | + } | ||
92 | + | ||
93 | + // =========================================================== | ||
94 | + // Methods | ||
95 | + // =========================================================== | ||
96 | + | ||
97 | + private void initViews() { | ||
98 | + mIvBack.setOnClickListener(this); | ||
99 | + } | ||
100 | + | ||
101 | + // =========================================================== | ||
102 | + // Inner and Anonymous Classes | ||
103 | + // =========================================================== | ||
104 | + | ||
105 | +} |
... | @@ -41,7 +41,7 @@ public class WarplyHealthManager implements SensorEventListener { | ... | @@ -41,7 +41,7 @@ public class WarplyHealthManager implements SensorEventListener { |
41 | private float oldVelocityEstimate = 0; | 41 | private float oldVelocityEstimate = 0; |
42 | 42 | ||
43 | //TODO: if we want to send the steps back to an activity/fragment/service etc | 43 | //TODO: if we want to send the steps back to an activity/fragment/service etc |
44 | -// private WarplyHealthCallback healthCallback; | 44 | +// private WarplyHealthCallback mHealthCallback; |
45 | 45 | ||
46 | // =========================================================== | 46 | // =========================================================== |
47 | // Methods for/from SuperClass/Interfaces | 47 | // Methods for/from SuperClass/Interfaces |
... | @@ -118,7 +118,7 @@ public class WarplyHealthManager implements SensorEventListener { | ... | @@ -118,7 +118,7 @@ public class WarplyHealthManager implements SensorEventListener { |
118 | && (timeNs - lastStepTimeNs > STEP_DELAY_NS)) { | 118 | && (timeNs - lastStepTimeNs > STEP_DELAY_NS)) { |
119 | //TODO: if we want to send the steps back to an activity/fragment/service etc | 119 | //TODO: if we want to send the steps back to an activity/fragment/service etc |
120 | mSteps++; | 120 | mSteps++; |
121 | -// healthCallback.onStepCount(mSteps); | 121 | +// mHealthCallback.onStepCount(mSteps); |
122 | lastStepTimeNs = timeNs; | 122 | lastStepTimeNs = timeNs; |
123 | } | 123 | } |
124 | oldVelocityEstimate = velocityEstimate; | 124 | oldVelocityEstimate = velocityEstimate; | ... | ... |
1 | -package ly.warp.sdk.views.adapters.mix; | 1 | +package ly.warp.sdk.views.adapters; |
2 | 2 | ||
3 | import android.content.Context; | 3 | import android.content.Context; |
4 | import android.text.TextUtils; | 4 | import android.text.TextUtils; |
... | @@ -22,7 +22,6 @@ import java.util.concurrent.TimeUnit; | ... | @@ -22,7 +22,6 @@ import java.util.concurrent.TimeUnit; |
22 | import io.reactivex.Observable; | 22 | import io.reactivex.Observable; |
23 | import io.reactivex.subjects.PublishSubject; | 23 | import io.reactivex.subjects.PublishSubject; |
24 | import ly.warp.sdk.R; | 24 | import ly.warp.sdk.R; |
25 | -import ly.warp.sdk.activities.BaseFragmentActivity; | ||
26 | import ly.warp.sdk.io.models.Coupon; | 25 | import ly.warp.sdk.io.models.Coupon; |
27 | import ly.warp.sdk.io.models.CouponList; | 26 | import ly.warp.sdk.io.models.CouponList; |
28 | 27 | ||
... | @@ -31,18 +30,27 @@ public class ActiveCouponAdapter extends RecyclerView.Adapter<ActiveCouponAdapte | ... | @@ -31,18 +30,27 @@ public class ActiveCouponAdapter extends RecyclerView.Adapter<ActiveCouponAdapte |
31 | private Context mContext; | 30 | private Context mContext; |
32 | private CouponList mCoupons; | 31 | private CouponList mCoupons; |
33 | private final PublishSubject<Coupon> onClickSubject = PublishSubject.create(); | 32 | private final PublishSubject<Coupon> onClickSubject = PublishSubject.create(); |
33 | + private boolean mIsPast = false; | ||
34 | 34 | ||
35 | public ActiveCouponAdapter(Context mContext, CouponList campaignList) { | 35 | public ActiveCouponAdapter(Context mContext, CouponList campaignList) { |
36 | this.mContext = mContext; | 36 | this.mContext = mContext; |
37 | this.mCoupons = campaignList; | 37 | this.mCoupons = campaignList; |
38 | + this.mIsPast = false; | ||
39 | + } | ||
40 | + | ||
41 | + public ActiveCouponAdapter(Context mContext, CouponList campaignList, boolean past) { | ||
42 | + this.mContext = mContext; | ||
43 | + this.mCoupons = campaignList; | ||
44 | + this.mIsPast = past; | ||
38 | } | 45 | } |
39 | 46 | ||
40 | public class ActiveCouponViewHolder extends RecyclerView.ViewHolder { | 47 | public class ActiveCouponViewHolder extends RecyclerView.ViewHolder { |
41 | - private ImageView ivCouponLogo; | 48 | + private ImageView ivCouponLogo, ivCouponBackground; |
42 | private TextView tvCouponTitle, tvCouponValue, tvCouponDate, tvCouponDescription; | 49 | private TextView tvCouponTitle, tvCouponValue, tvCouponDate, tvCouponDescription; |
43 | 50 | ||
44 | public ActiveCouponViewHolder(View view) { | 51 | public ActiveCouponViewHolder(View view) { |
45 | super(view); | 52 | super(view); |
53 | + ivCouponBackground = view.findViewById(R.id.iv_past_coupon_background); | ||
46 | ivCouponLogo = view.findViewById(R.id.iv_active_coupon); | 54 | ivCouponLogo = view.findViewById(R.id.iv_active_coupon); |
47 | tvCouponTitle = view.findViewById(R.id.tv_active_coupons_title); | 55 | tvCouponTitle = view.findViewById(R.id.tv_active_coupons_title); |
48 | tvCouponValue = view.findViewById(R.id.tv_active_coupons_value); | 56 | tvCouponValue = view.findViewById(R.id.tv_active_coupons_value); |
... | @@ -74,6 +82,9 @@ public class ActiveCouponAdapter extends RecyclerView.Adapter<ActiveCouponAdapte | ... | @@ -74,6 +82,9 @@ public class ActiveCouponAdapter extends RecyclerView.Adapter<ActiveCouponAdapte |
74 | @Override | 82 | @Override |
75 | public ActiveCouponViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { | 83 | public ActiveCouponViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { |
76 | View itemView; | 84 | View itemView; |
85 | + if (mIsPast) | ||
86 | + itemView = LayoutInflater.from(parent.getContext()).inflate(R.layout.past_coupon_layout, parent, false); | ||
87 | + else | ||
77 | itemView = LayoutInflater.from(parent.getContext()).inflate(R.layout.active_coupon_layout, parent, false); | 88 | itemView = LayoutInflater.from(parent.getContext()).inflate(R.layout.active_coupon_layout, parent, false); |
78 | return new ActiveCouponViewHolder(itemView); | 89 | return new ActiveCouponViewHolder(itemView); |
79 | } | 90 | } |
... | @@ -82,6 +93,9 @@ public class ActiveCouponAdapter extends RecyclerView.Adapter<ActiveCouponAdapte | ... | @@ -82,6 +93,9 @@ public class ActiveCouponAdapter extends RecyclerView.Adapter<ActiveCouponAdapte |
82 | public void onBindViewHolder(final ActiveCouponViewHolder holder, int position) { | 93 | public void onBindViewHolder(final ActiveCouponViewHolder holder, int position) { |
83 | Coupon couponItem = mCoupons.get(position); | 94 | Coupon couponItem = mCoupons.get(position); |
84 | 95 | ||
96 | + if (mIsPast) | ||
97 | + holder.ivCouponBackground.setColorFilter(ContextCompat.getColor(mContext, R.color.grey_light3), android.graphics.PorterDuff.Mode.MULTIPLY); | ||
98 | + | ||
85 | if (couponItem != null) { | 99 | if (couponItem != null) { |
86 | if (!TextUtils.isEmpty(couponItem.getImage())) { | 100 | if (!TextUtils.isEmpty(couponItem.getImage())) { |
87 | Glide.with(mContext) | 101 | Glide.with(mContext) |
... | @@ -99,6 +113,7 @@ public class ActiveCouponAdapter extends RecyclerView.Adapter<ActiveCouponAdapte | ... | @@ -99,6 +113,7 @@ public class ActiveCouponAdapter extends RecyclerView.Adapter<ActiveCouponAdapte |
99 | } | 113 | } |
100 | 114 | ||
101 | holder.tvCouponTitle.setText(couponItem.getName()); | 115 | holder.tvCouponTitle.setText(couponItem.getName()); |
116 | + if (!mIsPast) | ||
102 | holder.tvCouponDescription.setText(couponItem.getDescription()); | 117 | holder.tvCouponDescription.setText(couponItem.getDescription()); |
103 | 118 | ||
104 | SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd hh:mm"); | 119 | SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd hh:mm"); |
... | @@ -109,6 +124,9 @@ public class ActiveCouponAdapter extends RecyclerView.Adapter<ActiveCouponAdapte | ... | @@ -109,6 +124,9 @@ public class ActiveCouponAdapter extends RecyclerView.Adapter<ActiveCouponAdapte |
109 | e.printStackTrace(); | 124 | e.printStackTrace(); |
110 | } | 125 | } |
111 | simpleDateFormat = new SimpleDateFormat("dd/MM/yyyy"); | 126 | simpleDateFormat = new SimpleDateFormat("dd/MM/yyyy"); |
127 | + if (mIsPast) | ||
128 | + holder.tvCouponDate.setText(String.format(mContext.getString(R.string.cos_coupon_expired_date), simpleDateFormat.format(newDate != null ? newDate : ""))); | ||
129 | + else | ||
112 | holder.tvCouponDate.setText(String.format(mContext.getString(R.string.cos_coupon_date), simpleDateFormat.format(newDate != null ? newDate : ""))); | 130 | holder.tvCouponDate.setText(String.format(mContext.getString(R.string.cos_coupon_date), simpleDateFormat.format(newDate != null ? newDate : ""))); |
113 | 131 | ||
114 | holder.tvCouponValue.setText(couponItem.getDiscount() + mContext.getResources().getString(R.string.euro)); | 132 | holder.tvCouponValue.setText(couponItem.getDiscount() + mContext.getResources().getString(R.string.euro)); | ... | ... |
1 | +package ly.warp.sdk.views.adapters; | ||
2 | + | ||
3 | +import android.content.Context; | ||
4 | +import android.text.TextUtils; | ||
5 | +import android.view.LayoutInflater; | ||
6 | +import android.view.View; | ||
7 | +import android.view.ViewGroup; | ||
8 | +import android.widget.ImageView; | ||
9 | +import android.widget.TextView; | ||
10 | + | ||
11 | +import androidx.recyclerview.widget.RecyclerView; | ||
12 | + | ||
13 | +import com.bumptech.glide.Glide; | ||
14 | +import com.bumptech.glide.load.engine.DiskCacheStrategy; | ||
15 | + | ||
16 | +import io.reactivex.Observable; | ||
17 | +import io.reactivex.subjects.PublishSubject; | ||
18 | +import ly.warp.sdk.R; | ||
19 | +import ly.warp.sdk.io.models.Coupon; | ||
20 | +import ly.warp.sdk.io.models.CouponList; | ||
21 | + | ||
22 | +public class ActiveRewardAdapter extends RecyclerView.Adapter<ActiveRewardAdapter.ActiveRewardViewHolder> { | ||
23 | + | ||
24 | + private Context mContext; | ||
25 | + private CouponList mRewards; | ||
26 | + private final PublishSubject<Coupon> onClickSubject = PublishSubject.create(); | ||
27 | + | ||
28 | + public ActiveRewardAdapter(Context mContext, CouponList campaignList) { | ||
29 | + this.mContext = mContext; | ||
30 | + this.mRewards = campaignList; | ||
31 | + } | ||
32 | + | ||
33 | + public class ActiveRewardViewHolder extends RecyclerView.ViewHolder { | ||
34 | + private ImageView ivRewardLogo; | ||
35 | + private TextView tvRewardTitle, tvRewardDescription; | ||
36 | + | ||
37 | + public ActiveRewardViewHolder(View view) { | ||
38 | + super(view); | ||
39 | + ivRewardLogo = view.findViewById(R.id.iv_active_reward); | ||
40 | + tvRewardTitle = view.findViewById(R.id.tv_active_reward_title); | ||
41 | + tvRewardDescription = view.findViewById(R.id.tv_active_reward_description); | ||
42 | + } | ||
43 | + } | ||
44 | + | ||
45 | + @Override | ||
46 | + public int getItemCount() { | ||
47 | + if (mRewards == null) | ||
48 | + return 0; | ||
49 | + else | ||
50 | + return mRewards.size(); | ||
51 | + } | ||
52 | + | ||
53 | + | ||
54 | + public Coupon getItem(int id) { | ||
55 | + return mRewards.get(id); | ||
56 | + } | ||
57 | + | ||
58 | + public void updateData(CouponList couponList) { | ||
59 | + mRewards.clear(); | ||
60 | + mRewards.addAll(couponList); | ||
61 | + notifyDataSetChanged(); | ||
62 | + } | ||
63 | + | ||
64 | + | ||
65 | + @Override | ||
66 | + public ActiveRewardViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { | ||
67 | + View itemView; | ||
68 | + itemView = LayoutInflater.from(parent.getContext()).inflate(R.layout.active_rewards_layout, parent, false); | ||
69 | + return new ActiveRewardViewHolder(itemView); | ||
70 | + } | ||
71 | + | ||
72 | + @Override | ||
73 | + public void onBindViewHolder(final ActiveRewardViewHolder holder, int position) { | ||
74 | + Coupon couponItem = mRewards.get(position); | ||
75 | + | ||
76 | + if (couponItem != null) { | ||
77 | + if (!TextUtils.isEmpty(couponItem.getImage())) { | ||
78 | + Glide.with(mContext) | ||
79 | +// .setDefaultRequestOptions( | ||
80 | +// RequestOptions | ||
81 | +// .placeholderOf(R.drawable.ic_default_contact_photo) | ||
82 | +// .error(R.drawable.ic_default_contact_photo)) | ||
83 | + .load(couponItem.getImage()) | ||
84 | + .diskCacheStrategy(DiskCacheStrategy.DATA) | ||
85 | + .into(holder.ivRewardLogo); | ||
86 | + } else { | ||
87 | + Glide.with(mContext) | ||
88 | + .load(R.drawable.ic_cosmote_logo_horizontal_grey) | ||
89 | + .into(holder.ivRewardLogo); | ||
90 | + } | ||
91 | + | ||
92 | + holder.tvRewardTitle.setText(couponItem.getName()); | ||
93 | + holder.tvRewardDescription.setText(couponItem.getDescription()); | ||
94 | + holder.itemView.setOnClickListener(v -> onClickSubject.onNext(couponItem)); | ||
95 | + } | ||
96 | + } | ||
97 | + | ||
98 | + public Observable<Coupon> getPositionClicks() { | ||
99 | + return onClickSubject.cache(); | ||
100 | + } | ||
101 | +} |
17.6 KB
635 Bytes
979 Bytes
1 | -<?xml version="1.0" encoding="utf-8"?> | 1 | +<?xml version="1.0" encoding="utf-8"?><!--<shape xmlns:android="http://schemas.android.com/apk/res/android"--> |
2 | -<shape xmlns:android="http://schemas.android.com/apk/res/android" | 2 | +<!-- android:shape="rectangle">--> |
3 | - android:shape="rectangle"> | 3 | +<!-- <corners android:topLeftRadius="30dp" />--> |
4 | + | ||
5 | +<!-- <solid android:color="@color/grey_light" />--> | ||
6 | + | ||
7 | +<!--<!– <stroke–>--> | ||
8 | +<!--<!– android:width="1dp"–>--> | ||
9 | +<!--<!– android:color="@color/cos_green" />–>--> | ||
10 | +<!--</shape>--> | ||
11 | + | ||
12 | + | ||
13 | +<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> | ||
14 | + <item> | ||
15 | + <shape android:shape="rectangle"> | ||
4 | <corners android:topLeftRadius="30dp" /> | 16 | <corners android:topLeftRadius="30dp" /> |
17 | + <gradient | ||
18 | + android:angle="180" | ||
19 | + android:endColor="@color/cos_cyan2" | ||
20 | + android:startColor="@color/cos_green7" /> | ||
21 | + </shape> | ||
22 | + </item> | ||
5 | 23 | ||
24 | + <item android:top="4dp"> | ||
25 | + <shape xmlns:android="http://schemas.android.com/apk/res/android" | ||
26 | + android:shape="rectangle"> | ||
27 | + <corners android:topLeftRadius="30dp" /> | ||
6 | <solid android:color="@color/grey_light" /> | 28 | <solid android:color="@color/grey_light" /> |
7 | 29 | ||
8 | -<!-- <stroke--> | ||
9 | -<!-- android:width="1dp"--> | ||
10 | -<!-- android:color="@color/cos_green" />--> | ||
11 | -</shape> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
30 | + <!-- <stroke--> | ||
31 | + <!-- android:width="1dp"--> | ||
32 | + <!-- android:color="@color/cos_green" />--> | ||
33 | + </shape> | ||
34 | + </item> | ||
35 | + | ||
36 | +</layer-list> | ||
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
1 | +<?xml version="1.0" encoding="utf-8"?> | ||
2 | +<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android" | ||
3 | + xmlns:app="http://schemas.android.com/apk/res-auto" | ||
4 | + xmlns:tools="http://schemas.android.com/tools" | ||
5 | + android:layout_width="match_parent" | ||
6 | + android:layout_height="150dp" | ||
7 | + android:layout_marginHorizontal="10dp" | ||
8 | + android:layout_marginBottom="24dp" | ||
9 | + app:cardCornerRadius="4dp"> | ||
10 | + | ||
11 | + <androidx.constraintlayout.widget.ConstraintLayout | ||
12 | + android:layout_width="match_parent" | ||
13 | + android:layout_height="match_parent" | ||
14 | + android:background="@drawable/selector_cos_campaign"> | ||
15 | + | ||
16 | + <androidx.constraintlayout.widget.Guideline | ||
17 | + android:id="@+id/gl_vertical_60_percent" | ||
18 | + android:layout_width="wrap_content" | ||
19 | + android:layout_height="wrap_content" | ||
20 | + android:orientation="vertical" | ||
21 | + app:layout_constraintGuide_percent="0.6" /> | ||
22 | + | ||
23 | + <ImageView | ||
24 | + android:id="@+id/iv_active_reward" | ||
25 | + android:layout_width="0dp" | ||
26 | + android:layout_height="0dp" | ||
27 | + android:scaleType="centerCrop" | ||
28 | + app:layout_constraintBottom_toBottomOf="parent" | ||
29 | + app:layout_constraintHorizontal_bias="0.0" | ||
30 | + app:layout_constraintLeft_toLeftOf="parent" | ||
31 | + app:layout_constraintRight_toLeftOf="@+id/gl_vertical_60_percent" | ||
32 | + app:layout_constraintTop_toTopOf="parent" | ||
33 | + app:layout_constraintVertical_bias="0.0" | ||
34 | + tools:src="@drawable/ic_cosmote_logo_horizontal_grey" /> | ||
35 | + | ||
36 | + <LinearLayout | ||
37 | + android:layout_width="0dp" | ||
38 | + android:layout_height="match_parent" | ||
39 | + android:gravity="center_vertical" | ||
40 | + android:orientation="vertical" | ||
41 | + app:layout_constraintBottom_toBottomOf="parent" | ||
42 | + app:layout_constraintLeft_toRightOf="@+id/gl_vertical_60_percent" | ||
43 | + app:layout_constraintRight_toRightOf="parent" | ||
44 | + app:layout_constraintTop_toTopOf="parent"> | ||
45 | + | ||
46 | + <TextView | ||
47 | + android:id="@+id/tv_active_reward_title" | ||
48 | + android:layout_width="wrap_content" | ||
49 | + android:layout_height="wrap_content" | ||
50 | + android:layout_marginHorizontal="16dp" | ||
51 | + android:layout_marginBottom="2dp" | ||
52 | + android:maxLines="2" | ||
53 | + android:textColor="@color/grey" | ||
54 | + android:textSize="16sp" | ||
55 | + android:textStyle="bold" | ||
56 | + tools:text="-5$ στο BOX" /> | ||
57 | + | ||
58 | + <TextView | ||
59 | + android:id="@+id/tv_active_reward_description" | ||
60 | + android:layout_width="wrap_content" | ||
61 | + android:layout_height="wrap_content" | ||
62 | + android:layout_marginHorizontal="16dp" | ||
63 | + android:layout_marginTop="2dp" | ||
64 | + android:maxLines="4" | ||
65 | + android:textColor="@color/grey" | ||
66 | + android:textSize="16sp" | ||
67 | + tools:text="-10% in all products from IKEA" /> | ||
68 | + </LinearLayout> | ||
69 | + | ||
70 | + </androidx.constraintlayout.widget.ConstraintLayout> | ||
71 | +</androidx.cardview.widget.CardView> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
... | @@ -9,7 +9,8 @@ | ... | @@ -9,7 +9,8 @@ |
9 | android:id="@+id/cl_bill_header" | 9 | android:id="@+id/cl_bill_header" |
10 | android:layout_width="match_parent" | 10 | android:layout_width="match_parent" |
11 | android:layout_height="80dp" | 11 | android:layout_height="80dp" |
12 | - app:layout_constraintTop_toTopOf="parent"> | 12 | + app:layout_constraintTop_toTopOf="parent" |
13 | + android:background="@android:color/white"> | ||
13 | 14 | ||
14 | <ImageView | 15 | <ImageView |
15 | android:id="@+id/iv_coupons_close" | 16 | android:id="@+id/iv_coupons_close" |
... | @@ -19,21 +20,21 @@ | ... | @@ -19,21 +20,21 @@ |
19 | android:layout_marginTop="4dp" | 20 | android:layout_marginTop="4dp" |
20 | android:src="@drawable/ic_back" | 21 | android:src="@drawable/ic_back" |
21 | app:layout_constraintStart_toStartOf="parent" | 22 | app:layout_constraintStart_toStartOf="parent" |
22 | - app:layout_constraintTop_toTopOf="@+id/textView3" /> | 23 | + app:layout_constraintTop_toTopOf="parent" |
24 | + app:layout_constraintBottom_toBottomOf="parent"/> | ||
23 | 25 | ||
24 | <TextView | 26 | <TextView |
25 | android:id="@+id/textView3" | 27 | android:id="@+id/textView3" |
26 | android:layout_width="206dp" | 28 | android:layout_width="206dp" |
27 | android:layout_height="32dp" | 29 | android:layout_height="32dp" |
28 | android:gravity="center" | 30 | android:gravity="center" |
29 | - android:text="Όλα τα κουπόνια μου" | 31 | + android:text="@string/cos_active_all_coupons" |
30 | android:textColor="@color/grey" | 32 | android:textColor="@color/grey" |
31 | android:textSize="17sp" | 33 | android:textSize="17sp" |
32 | android:textStyle="bold" | 34 | android:textStyle="bold" |
33 | app:layout_constraintBottom_toBottomOf="parent" | 35 | app:layout_constraintBottom_toBottomOf="parent" |
34 | app:layout_constraintEnd_toEndOf="parent" | 36 | app:layout_constraintEnd_toEndOf="parent" |
35 | - app:layout_constraintHorizontal_bias="0.356" | 37 | + app:layout_constraintStart_toStartOf="parent" |
36 | - app:layout_constraintStart_toEndOf="@+id/iv_coupons_close" | ||
37 | app:layout_constraintTop_toTopOf="parent" /> | 38 | app:layout_constraintTop_toTopOf="parent" /> |
38 | </androidx.constraintlayout.widget.ConstraintLayout> | 39 | </androidx.constraintlayout.widget.ConstraintLayout> |
39 | 40 | ||
... | @@ -61,7 +62,7 @@ | ... | @@ -61,7 +62,7 @@ |
61 | android:layout_width="wrap_content" | 62 | android:layout_width="wrap_content" |
62 | android:layout_height="wrap_content" | 63 | android:layout_height="wrap_content" |
63 | android:layout_centerInParent="true" | 64 | android:layout_centerInParent="true" |
64 | - android:text="Δεν υπάρχουν κουπόνια" | 65 | + android:text="@string/cos_no_active_coupons" |
65 | android:textColor="@color/grey" | 66 | android:textColor="@color/grey" |
66 | android:textSize="18sp" | 67 | android:textSize="18sp" |
67 | android:visibility="gone" | 68 | android:visibility="gone" | ... | ... |
1 | +<?xml version="1.0" encoding="utf-8"?> | ||
2 | +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
3 | + xmlns:app="http://schemas.android.com/apk/res-auto" | ||
4 | + android:id="@+id/cl_bill_payment" | ||
5 | + android:layout_width="match_parent" | ||
6 | + android:layout_height="match_parent"> | ||
7 | + | ||
8 | + <androidx.constraintlayout.widget.ConstraintLayout | ||
9 | + android:id="@+id/cl_bill_header" | ||
10 | + android:layout_width="match_parent" | ||
11 | + android:layout_height="80dp" | ||
12 | + android:background="@android:color/white" | ||
13 | + app:layout_constraintTop_toTopOf="parent"> | ||
14 | + | ||
15 | + <ImageView | ||
16 | + android:id="@+id/iv_coupons_close" | ||
17 | + android:layout_width="21dp" | ||
18 | + android:layout_height="20dp" | ||
19 | + android:layout_marginStart="24dp" | ||
20 | + android:layout_marginTop="4dp" | ||
21 | + android:src="@drawable/ic_back" | ||
22 | + app:layout_constraintBottom_toBottomOf="parent" | ||
23 | + app:layout_constraintStart_toStartOf="parent" | ||
24 | + app:layout_constraintTop_toTopOf="parent" /> | ||
25 | + | ||
26 | + <TextView | ||
27 | + android:id="@+id/textView3" | ||
28 | + android:layout_width="206dp" | ||
29 | + android:layout_height="32dp" | ||
30 | + android:gravity="center" | ||
31 | + android:text="@string/cos_active_all_rewards" | ||
32 | + android:textColor="@color/grey" | ||
33 | + android:textSize="17sp" | ||
34 | + android:textStyle="bold" | ||
35 | + app:layout_constraintBottom_toBottomOf="parent" | ||
36 | + app:layout_constraintEnd_toEndOf="parent" | ||
37 | + app:layout_constraintStart_toStartOf="parent" | ||
38 | + app:layout_constraintTop_toTopOf="parent" /> | ||
39 | + </androidx.constraintlayout.widget.ConstraintLayout> | ||
40 | + | ||
41 | + <androidx.constraintlayout.widget.ConstraintLayout | ||
42 | + android:layout_width="match_parent" | ||
43 | + android:layout_height="match_parent" | ||
44 | + android:layout_below="@+id/cl_bill_header" | ||
45 | + android:layout_marginTop="1dp" | ||
46 | + android:background="@drawable/shape_cos_loyalty" | ||
47 | + android:orientation="vertical"> | ||
48 | + | ||
49 | + <androidx.recyclerview.widget.RecyclerView | ||
50 | + android:id="@+id/rv_active_rewards" | ||
51 | + android:layout_width="match_parent" | ||
52 | + android:layout_height="0dp" | ||
53 | + android:paddingTop="48dp" | ||
54 | + app:layout_constraintBottom_toBottomOf="parent" | ||
55 | + app:layout_constraintEnd_toEndOf="parent" | ||
56 | + app:layout_constraintStart_toStartOf="parent" | ||
57 | + app:layout_constraintTop_toTopOf="parent" /> | ||
58 | + </androidx.constraintlayout.widget.ConstraintLayout> | ||
59 | + | ||
60 | + <TextView | ||
61 | + android:id="@+id/tv_no_rewards" | ||
62 | + android:layout_width="wrap_content" | ||
63 | + android:layout_height="wrap_content" | ||
64 | + android:layout_centerInParent="true" | ||
65 | + android:text="@string/cos_no_active_rewards" | ||
66 | + android:textColor="@color/grey" | ||
67 | + android:textSize="18sp" | ||
68 | + android:textStyle="bold" | ||
69 | + android:visibility="gone" /> | ||
70 | +</RelativeLayout> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
... | @@ -40,7 +40,8 @@ | ... | @@ -40,7 +40,8 @@ |
40 | android:layout_height="90dp" | 40 | android:layout_height="90dp" |
41 | android:layout_below="@+id/cl_loyalty_wallet_header" | 41 | android:layout_below="@+id/cl_loyalty_wallet_header" |
42 | android:layout_marginVertical="24dp" | 42 | android:layout_marginVertical="24dp" |
43 | - android:paddingHorizontal="24dp"> | 43 | + android:paddingHorizontal="24dp" |
44 | + android:background="@android:color/white"> | ||
44 | 45 | ||
45 | <de.hdodenhof.circleimageview.CircleImageView | 46 | <de.hdodenhof.circleimageview.CircleImageView |
46 | android:id="@+id/iv_profile_photo" | 47 | android:id="@+id/iv_profile_photo" |
... | @@ -125,10 +126,11 @@ | ... | @@ -125,10 +126,11 @@ |
125 | <androidx.constraintlayout.widget.ConstraintLayout | 126 | <androidx.constraintlayout.widget.ConstraintLayout |
126 | android:id="@+id/cl_loyalty_deals" | 127 | android:id="@+id/cl_loyalty_deals" |
127 | android:layout_width="match_parent" | 128 | android:layout_width="match_parent" |
128 | - android:layout_height="160dp" | 129 | + android:layout_height="wrap_content" |
129 | android:layout_marginHorizontal="6dp" | 130 | android:layout_marginHorizontal="6dp" |
130 | android:layout_marginTop="48dp" | 131 | android:layout_marginTop="48dp" |
131 | - android:background="@drawable/shape_cos_white2"> | 132 | + android:background="@drawable/shape_cos_white2" |
133 | + android:paddingVertical="10dp"> | ||
132 | 134 | ||
133 | <LinearLayout | 135 | <LinearLayout |
134 | android:layout_width="wrap_content" | 136 | android:layout_width="wrap_content" |
... | @@ -152,7 +154,6 @@ | ... | @@ -152,7 +154,6 @@ |
152 | android:id="@+id/tv_active_deals_code" | 154 | android:id="@+id/tv_active_deals_code" |
153 | android:layout_width="wrap_content" | 155 | android:layout_width="wrap_content" |
154 | android:layout_height="wrap_content" | 156 | android:layout_height="wrap_content" |
155 | - android:layout_marginBottom="8dp" | ||
156 | android:text="961544809" | 157 | android:text="961544809" |
157 | android:textColor="@color/blue_dark" | 158 | android:textColor="@color/blue_dark" |
158 | android:textSize="18sp" | 159 | android:textSize="18sp" |
... | @@ -161,7 +162,6 @@ | ... | @@ -161,7 +162,6 @@ |
161 | <TextView | 162 | <TextView |
162 | android:layout_width="wrap_content" | 163 | android:layout_width="wrap_content" |
163 | android:layout_height="wrap_content" | 164 | android:layout_height="wrap_content" |
164 | - android:layout_marginTop="8dp" | ||
165 | android:text="Λήγει σε 4 ημέρες" | 165 | android:text="Λήγει σε 4 ημέρες" |
166 | android:textColor="@color/cos_grey3" | 166 | android:textColor="@color/cos_grey3" |
167 | android:textFontWeight="600" /> | 167 | android:textFontWeight="600" /> | ... | ... |
1 | +<?xml version="1.0" encoding="utf-8"?> | ||
2 | +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
3 | + xmlns:app="http://schemas.android.com/apk/res-auto" | ||
4 | + android:id="@+id/cl_bill_payment" | ||
5 | + android:layout_width="match_parent" | ||
6 | + android:layout_height="match_parent"> | ||
7 | + | ||
8 | + <androidx.constraintlayout.widget.ConstraintLayout | ||
9 | + android:id="@+id/cl_bill_header" | ||
10 | + android:layout_width="match_parent" | ||
11 | + android:layout_height="80dp" | ||
12 | + android:background="@android:color/white" | ||
13 | + app:layout_constraintTop_toTopOf="parent"> | ||
14 | + | ||
15 | + <ImageView | ||
16 | + android:id="@+id/iv_coupons_close" | ||
17 | + android:layout_width="21dp" | ||
18 | + android:layout_height="20dp" | ||
19 | + android:layout_marginStart="24dp" | ||
20 | + android:layout_marginTop="4dp" | ||
21 | + android:src="@drawable/ic_back" | ||
22 | + app:layout_constraintBottom_toBottomOf="parent" | ||
23 | + app:layout_constraintStart_toStartOf="parent" | ||
24 | + app:layout_constraintTop_toTopOf="parent" /> | ||
25 | + | ||
26 | + <TextView | ||
27 | + android:id="@+id/textView3" | ||
28 | + android:layout_width="206dp" | ||
29 | + android:layout_height="32dp" | ||
30 | + android:gravity="center" | ||
31 | + android:text="@string/cos_past_all_coupons" | ||
32 | + android:textColor="@color/grey" | ||
33 | + android:textSize="17sp" | ||
34 | + android:textStyle="bold" | ||
35 | + app:layout_constraintBottom_toBottomOf="parent" | ||
36 | + app:layout_constraintEnd_toEndOf="parent" | ||
37 | + app:layout_constraintStart_toStartOf="parent" | ||
38 | + app:layout_constraintTop_toTopOf="parent" /> | ||
39 | + | ||
40 | + <ImageView | ||
41 | + android:id="@+id/iv_loyalty_wallet" | ||
42 | + android:layout_width="40dp" | ||
43 | + android:layout_height="40dp" | ||
44 | + android:layout_marginEnd="24dp" | ||
45 | + android:src="@drawable/ic_rewards_wallet" | ||
46 | + app:layout_constraintBottom_toBottomOf="parent" | ||
47 | + app:layout_constraintEnd_toEndOf="parent" | ||
48 | + app:layout_constraintTop_toTopOf="parent" /> | ||
49 | + </androidx.constraintlayout.widget.ConstraintLayout> | ||
50 | + | ||
51 | + <androidx.constraintlayout.widget.ConstraintLayout | ||
52 | + android:layout_width="match_parent" | ||
53 | + android:layout_height="match_parent" | ||
54 | + android:layout_below="@+id/cl_bill_header" | ||
55 | + android:layout_marginTop="1dp" | ||
56 | + android:background="@drawable/shape_cos_loyalty" | ||
57 | + android:orientation="vertical"> | ||
58 | + | ||
59 | + <androidx.recyclerview.widget.RecyclerView | ||
60 | + android:id="@+id/rv_active_coupons" | ||
61 | + android:layout_width="match_parent" | ||
62 | + android:layout_height="0dp" | ||
63 | + android:paddingTop="48dp" | ||
64 | + app:layout_constraintBottom_toBottomOf="parent" | ||
65 | + app:layout_constraintEnd_toEndOf="parent" | ||
66 | + app:layout_constraintStart_toStartOf="parent" | ||
67 | + app:layout_constraintTop_toTopOf="parent" /> | ||
68 | + </androidx.constraintlayout.widget.ConstraintLayout> | ||
69 | + | ||
70 | + <TextView | ||
71 | + android:id="@+id/tv_no_coupons" | ||
72 | + android:layout_width="wrap_content" | ||
73 | + android:layout_height="wrap_content" | ||
74 | + android:layout_centerInParent="true" | ||
75 | + android:text="@string/cos_no_active_coupons" | ||
76 | + android:textColor="@color/grey" | ||
77 | + android:textSize="18sp" | ||
78 | + android:textStyle="bold" | ||
79 | + android:visibility="gone" /> | ||
80 | +</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" | 2 | xmlns:app="http://schemas.android.com/apk/res-auto" |
3 | + xmlns:tools="http://schemas.android.com/tools" | ||
3 | android:layout_width="match_parent" | 4 | android:layout_width="match_parent" |
4 | android:layout_height="wrap_content" | 5 | android:layout_height="wrap_content" |
5 | android:paddingBottom="24dp"> | 6 | android:paddingBottom="24dp"> |
... | @@ -43,6 +44,7 @@ | ... | @@ -43,6 +44,7 @@ |
43 | android:layout_height="wrap_content" | 44 | android:layout_height="wrap_content" |
44 | android:text="60%" | 45 | android:text="60%" |
45 | android:textColor="#00CB09" | 46 | android:textColor="#00CB09" |
47 | + android:textFontWeight="600" | ||
46 | android:textSize="17sp" | 48 | android:textSize="17sp" |
47 | app:layout_constraintBottom_toBottomOf="parent" | 49 | app:layout_constraintBottom_toBottomOf="parent" |
48 | app:layout_constraintEnd_toEndOf="parent" | 50 | app:layout_constraintEnd_toEndOf="parent" |
... | @@ -82,6 +84,7 @@ | ... | @@ -82,6 +84,7 @@ |
82 | android:layout_height="wrap_content" | 84 | android:layout_height="wrap_content" |
83 | android:text="22%" | 85 | android:text="22%" |
84 | android:textColor="#9973F3" | 86 | android:textColor="#9973F3" |
87 | + android:textFontWeight="600" | ||
85 | android:textSize="17sp" | 88 | android:textSize="17sp" |
86 | app:layout_constraintBottom_toBottomOf="parent" | 89 | app:layout_constraintBottom_toBottomOf="parent" |
87 | app:layout_constraintEnd_toEndOf="parent" | 90 | app:layout_constraintEnd_toEndOf="parent" |
... | @@ -120,6 +123,90 @@ | ... | @@ -120,6 +123,90 @@ |
120 | android:layout_height="wrap_content" | 123 | android:layout_height="wrap_content" |
121 | android:text="18%" | 124 | android:text="18%" |
122 | android:textColor="#0072C9" | 125 | android:textColor="#0072C9" |
126 | + android:textFontWeight="600" | ||
127 | + android:textSize="17sp" | ||
128 | + app:layout_constraintBottom_toBottomOf="parent" | ||
129 | + app:layout_constraintEnd_toEndOf="parent" | ||
130 | + app:layout_constraintTop_toTopOf="parent" /> | ||
131 | + </androidx.constraintlayout.widget.ConstraintLayout> | ||
132 | + | ||
133 | + <androidx.constraintlayout.widget.ConstraintLayout | ||
134 | + android:id="@+id/analysis_tab4" | ||
135 | + android:layout_width="match_parent" | ||
136 | + android:layout_height="wrap_content" | ||
137 | + android:layout_below="@+id/analysis_tab2" | ||
138 | + android:layout_marginVertical="20dp" | ||
139 | + android:visibility="gone" | ||
140 | + tools:visibility="visible"> | ||
141 | + | ||
142 | + <ImageView | ||
143 | + android:id="@+id/iv_chart_icon4" | ||
144 | + android:layout_width="24dp" | ||
145 | + android:layout_height="24dp" | ||
146 | + android:src="@drawable/ic_gift" | ||
147 | + app:layout_constraintBottom_toBottomOf="parent" | ||
148 | + app:layout_constraintStart_toStartOf="parent" | ||
149 | + app:layout_constraintTop_toTopOf="parent" /> | ||
150 | + | ||
151 | + <TextView | ||
152 | + android:layout_width="wrap_content" | ||
153 | + android:layout_height="wrap_content" | ||
154 | + android:layout_marginStart="16dp" | ||
155 | + android:text="Δώρο Γενεθλίων" | ||
156 | + android:textColor="#4D4C58" | ||
157 | + android:textSize="15sp" | ||
158 | + android:textStyle="bold" | ||
159 | + app:layout_constraintBottom_toBottomOf="parent" | ||
160 | + app:layout_constraintStart_toEndOf="@+id/iv_chart_icon4" | ||
161 | + app:layout_constraintTop_toTopOf="parent" /> | ||
162 | + | ||
163 | + <TextView | ||
164 | + android:layout_width="wrap_content" | ||
165 | + android:layout_height="wrap_content" | ||
166 | + android:text="50%" | ||
167 | + android:textColor="#00CB09" | ||
168 | + android:textFontWeight="600" | ||
169 | + android:textSize="17sp" | ||
170 | + app:layout_constraintBottom_toBottomOf="parent" | ||
171 | + app:layout_constraintEnd_toEndOf="parent" | ||
172 | + app:layout_constraintTop_toTopOf="parent" /> | ||
173 | + </androidx.constraintlayout.widget.ConstraintLayout> | ||
174 | + | ||
175 | + <androidx.constraintlayout.widget.ConstraintLayout | ||
176 | + android:id="@+id/analysis_tab5" | ||
177 | + android:layout_width="match_parent" | ||
178 | + android:layout_height="wrap_content" | ||
179 | + android:layout_below="@+id/analysis_tab2" | ||
180 | + android:visibility="gone" | ||
181 | + tools:visibility="visible"> | ||
182 | + | ||
183 | + <ImageView | ||
184 | + android:id="@+id/iv_chart_icon5" | ||
185 | + android:layout_width="24dp" | ||
186 | + android:layout_height="24dp" | ||
187 | + android:src="@drawable/ic_steering_wheel" | ||
188 | + app:layout_constraintBottom_toBottomOf="parent" | ||
189 | + app:layout_constraintStart_toStartOf="parent" | ||
190 | + app:layout_constraintTop_toTopOf="parent" /> | ||
191 | + | ||
192 | + <TextView | ||
193 | + android:layout_width="wrap_content" | ||
194 | + android:layout_height="wrap_content" | ||
195 | + android:layout_marginStart="16dp" | ||
196 | + android:text="Safe driving" | ||
197 | + android:textColor="#4D4C58" | ||
198 | + android:textSize="15sp" | ||
199 | + android:textStyle="bold" | ||
200 | + app:layout_constraintBottom_toBottomOf="parent" | ||
201 | + app:layout_constraintStart_toEndOf="@+id/iv_chart_icon5" | ||
202 | + app:layout_constraintTop_toTopOf="parent" /> | ||
203 | + | ||
204 | + <TextView | ||
205 | + android:layout_width="wrap_content" | ||
206 | + android:layout_height="wrap_content" | ||
207 | + android:text="50%" | ||
208 | + android:textColor="#3D5265" | ||
209 | + android:textFontWeight="600" | ||
123 | android:textSize="17sp" | 210 | android:textSize="17sp" |
124 | app:layout_constraintBottom_toBottomOf="parent" | 211 | app:layout_constraintBottom_toBottomOf="parent" |
125 | app:layout_constraintEnd_toEndOf="parent" | 212 | app:layout_constraintEnd_toEndOf="parent" | ... | ... |
... | @@ -21,6 +21,7 @@ | ... | @@ -21,6 +21,7 @@ |
21 | <include | 21 | <include |
22 | android:id="@+id/piechart" | 22 | android:id="@+id/piechart" |
23 | layout="@layout/cos_piechart2" | 23 | layout="@layout/cos_piechart2" |
24 | + android:visibility="gone" | ||
24 | app:layout_constraintBottom_toBottomOf="parent" | 25 | app:layout_constraintBottom_toBottomOf="parent" |
25 | app:layout_constraintEnd_toEndOf="@+id/iv_chart" | 26 | app:layout_constraintEnd_toEndOf="@+id/iv_chart" |
26 | app:layout_constraintStart_toStartOf="parent" | 27 | app:layout_constraintStart_toStartOf="parent" | ... | ... |
... | @@ -32,6 +32,7 @@ | ... | @@ -32,6 +32,7 @@ |
32 | layout="@layout/cos_piechart2" | 32 | layout="@layout/cos_piechart2" |
33 | android:layout_width="200dp" | 33 | android:layout_width="200dp" |
34 | android:layout_height="200dp" | 34 | android:layout_height="200dp" |
35 | + android:visibility="gone" | ||
35 | app:layout_constraintEnd_toEndOf="parent" | 36 | app:layout_constraintEnd_toEndOf="parent" |
36 | app:layout_constraintStart_toStartOf="parent" | 37 | app:layout_constraintStart_toStartOf="parent" |
37 | app:layout_constraintTop_toTopOf="parent" /> | 38 | app:layout_constraintTop_toTopOf="parent" /> | ... | ... |
1 | <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | 1 | <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" |
2 | + xmlns:tools="http://schemas.android.com/tools" | ||
2 | android:layout_width="match_parent" | 3 | android:layout_width="match_parent" |
3 | android:layout_height="wrap_content"> | 4 | android:layout_height="wrap_content"> |
4 | 5 | ||
... | @@ -30,25 +31,45 @@ | ... | @@ -30,25 +31,45 @@ |
30 | android:layout_centerHorizontal="true" | 31 | android:layout_centerHorizontal="true" |
31 | android:layout_marginTop="32dp" /> | 32 | android:layout_marginTop="32dp" /> |
32 | 33 | ||
34 | + <LinearLayout | ||
35 | + android:id="@+id/ll_spinners" | ||
36 | + android:layout_width="match_parent" | ||
37 | + android:layout_height="wrap_content" | ||
38 | + android:layout_below="@+id/cl_chart" | ||
39 | + android:layout_marginTop="32dp" | ||
40 | + android:gravity="center" | ||
41 | + android:orientation="vertical"> | ||
42 | + | ||
33 | <Spinner | 43 | <Spinner |
34 | android:id="@+id/sp_redemption" | 44 | android:id="@+id/sp_redemption" |
35 | android:layout_width="match_parent" | 45 | android:layout_width="match_parent" |
36 | android:layout_height="60dp" | 46 | android:layout_height="60dp" |
37 | - android:layout_below="@+id/cl_chart" | ||
38 | android:layout_centerHorizontal="true" | 47 | android:layout_centerHorizontal="true" |
39 | - android:layout_marginTop="32dp" | ||
40 | android:background="@drawable/shape_cos_sky_blue" | 48 | android:background="@drawable/shape_cos_sky_blue" |
41 | android:dropDownVerticalOffset="62dp" | 49 | android:dropDownVerticalOffset="62dp" |
42 | android:popupBackground="@drawable/shape_cos_sky_blue" | 50 | android:popupBackground="@drawable/shape_cos_sky_blue" |
43 | android:popupElevation="1dp" | 51 | android:popupElevation="1dp" |
44 | android:spinnerMode="dropdown" /> | 52 | android:spinnerMode="dropdown" /> |
45 | 53 | ||
54 | + <Spinner | ||
55 | + android:id="@+id/sp_collection" | ||
56 | + android:layout_width="match_parent" | ||
57 | + android:layout_height="60dp" | ||
58 | + android:layout_centerHorizontal="true" | ||
59 | + android:background="@drawable/shape_cos_sky_blue" | ||
60 | + android:dropDownVerticalOffset="62dp" | ||
61 | + android:popupBackground="@drawable/shape_cos_sky_blue" | ||
62 | + android:popupElevation="1dp" | ||
63 | + android:spinnerMode="dropdown" | ||
64 | + android:visibility="gone" /> | ||
65 | + </LinearLayout> | ||
66 | + | ||
46 | <include | 67 | <include |
47 | android:id="@+id/cl_chart_info" | 68 | android:id="@+id/cl_chart_info" |
48 | layout="@layout/cos_analysis" | 69 | layout="@layout/cos_analysis" |
49 | android:layout_width="match_parent" | 70 | android:layout_width="match_parent" |
50 | android:layout_height="wrap_content" | 71 | android:layout_height="wrap_content" |
51 | - android:layout_below="@+id/sp_redemption" | 72 | + android:layout_below="@+id/ll_spinners" |
52 | android:layout_marginTop="32dp" /> | 73 | android:layout_marginTop="32dp" /> |
53 | </RelativeLayout> | 74 | </RelativeLayout> |
54 | </RelativeLayout> | 75 | </RelativeLayout> |
... | \ 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:tools="http://schemas.android.com/tools" | ||
5 | + android:layout_width="match_parent" | ||
6 | + android:layout_height="140dp" | ||
7 | + android:layout_marginBottom="16dp"> | ||
8 | + | ||
9 | + <ImageView | ||
10 | + android:id="@+id/iv_past_coupon_background" | ||
11 | + android:layout_width="match_parent" | ||
12 | + android:layout_height="140dp" | ||
13 | + android:src="@drawable/ic_coupon_background" | ||
14 | + app:layout_constraintBottom_toBottomOf="parent" | ||
15 | + app:layout_constraintEnd_toEndOf="parent" | ||
16 | + app:layout_constraintStart_toStartOf="parent" | ||
17 | + app:layout_constraintTop_toTopOf="parent" /> | ||
18 | + | ||
19 | + <ImageView | ||
20 | + android:id="@+id/iv_active_coupon" | ||
21 | + android:layout_width="80dp" | ||
22 | + android:layout_height="80dp" | ||
23 | + android:layout_marginStart="24dp" | ||
24 | + app:layout_constraintBottom_toBottomOf="parent" | ||
25 | + app:layout_constraintStart_toStartOf="parent" | ||
26 | + app:layout_constraintTop_toTopOf="parent" | ||
27 | + tools:src="@drawable/ic_gifts_for_you" /> | ||
28 | + | ||
29 | + <View | ||
30 | + android:id="@+id/v_separator" | ||
31 | + android:layout_width="1dp" | ||
32 | + android:layout_height="match_parent" | ||
33 | + android:layout_marginVertical="16dp" | ||
34 | + android:layout_marginStart="8dp" | ||
35 | + android:background="@drawable/shape_dashed_vertical" | ||
36 | + app:layout_constraintBottom_toBottomOf="parent" | ||
37 | + app:layout_constraintStart_toEndOf="@+id/iv_active_coupon" | ||
38 | + app:layout_constraintTop_toTopOf="parent" /> | ||
39 | + | ||
40 | + <LinearLayout | ||
41 | + android:id="@+id/ll_coupon_info" | ||
42 | + android:layout_width="0dp" | ||
43 | + android:layout_height="wrap_content" | ||
44 | + android:layout_marginStart="16dp" | ||
45 | + android:layout_marginEnd="24dp" | ||
46 | + android:orientation="vertical" | ||
47 | + app:layout_constraintBottom_toBottomOf="parent" | ||
48 | + app:layout_constraintEnd_toEndOf="parent" | ||
49 | + app:layout_constraintStart_toEndOf="@+id/v_separator" | ||
50 | + app:layout_constraintTop_toTopOf="parent"> | ||
51 | + | ||
52 | + <TextView | ||
53 | + android:id="@+id/tv_active_coupons_title" | ||
54 | + android:layout_width="wrap_content" | ||
55 | + android:layout_height="wrap_content" | ||
56 | + android:ellipsize="end" | ||
57 | + android:maxLines="1" | ||
58 | + android:textColor="@color/blue_dark" | ||
59 | + android:textFontWeight="600" | ||
60 | + android:textSize="16sp" | ||
61 | + tools:text="Εκπτωτικο κουπονι 10$ για αγορες στα ΙΚΕΑ" /> | ||
62 | + | ||
63 | + <TextView | ||
64 | + android:id="@+id/tv_active_coupons_value" | ||
65 | + android:layout_width="wrap_content" | ||
66 | + android:layout_height="wrap_content" | ||
67 | + android:textColor="@color/blue_dark" | ||
68 | + android:textSize="28sp" | ||
69 | + android:textStyle="bold" | ||
70 | + tools:text="10$" /> | ||
71 | + | ||
72 | + <TextView | ||
73 | + android:id="@+id/tv_active_coupons_date" | ||
74 | + android:layout_width="wrap_content" | ||
75 | + android:layout_height="wrap_content" | ||
76 | + android:textColor="@color/cos_grey4" | ||
77 | + android:textFontWeight="600" | ||
78 | + android:textSize="12sp" | ||
79 | + tools:text="@string/cos_active_coupon_date" /> | ||
80 | + </LinearLayout> | ||
81 | +</androidx.constraintlayout.widget.ConstraintLayout> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
... | @@ -38,4 +38,6 @@ | ... | @@ -38,4 +38,6 @@ |
38 | <color name="grey4">#F3F3F3</color> | 38 | <color name="grey4">#F3F3F3</color> |
39 | <color name="grey_tr3">#7DF2F2F2</color> | 39 | <color name="grey_tr3">#7DF2F2F2</color> |
40 | <color name="cos_dark_blue">#355168</color> | 40 | <color name="cos_dark_blue">#355168</color> |
41 | + <color name="cos_grey4">#617181</color> | ||
42 | + <color name="grey_light3">#E3E3E3</color> | ||
41 | </resources> | 43 | </resources> |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
... | @@ -55,13 +55,23 @@ | ... | @@ -55,13 +55,23 @@ |
55 | <string name="cos_analysis2">Αναλυτικά</string> | 55 | <string name="cos_analysis2">Αναλυτικά</string> |
56 | <string name="euro">€</string> | 56 | <string name="euro">€</string> |
57 | <string name="cos_profile_questionnaire">+ Ερωτηματολόγιο</string> | 57 | <string name="cos_profile_questionnaire">+ Ερωτηματολόγιο</string> |
58 | + <string name="cos_active_all_coupons">Όλα τα κουπόνια μου</string> | ||
59 | + <string name="cos_active_all_rewards">Όλα τα δώρα μου</string> | ||
60 | + <string name="cos_no_active_coupons">Δεν υπάρχουν κουπόνια</string> | ||
61 | + <string name="cos_no_active_rewards">Δεν υπάρχουν δώρα</string> | ||
62 | + <string name="cos_past_all_coupons">Παλαιότερα κουπόνια</string> | ||
63 | + <string name="cos_coupon_expired_date">Εξαργυρώθηκε την %1$s</string> | ||
58 | 64 | ||
59 | <string-array name="coupons_array"> | 65 | <string-array name="coupons_array"> |
60 | <item>Κουπόνια</item> | 66 | <item>Κουπόνια</item> |
61 | - <item>Deals for you</item> | 67 | + <item>Δώρα</item> |
62 | </string-array> | 68 | </string-array> |
63 | 69 | ||
64 | <string-array name="redemption_array"> | 70 | <string-array name="redemption_array"> |
65 | <item>Εξαργύρωση</item> | 71 | <item>Εξαργύρωση</item> |
66 | </string-array> | 72 | </string-array> |
73 | + | ||
74 | + <string-array name="collection_array"> | ||
75 | + <item>Συλλογή</item> | ||
76 | + </string-array> | ||
67 | </resources> | 77 | </resources> |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
-
Please register or login to post a comment