Showing
4 changed files
with
103 additions
and
59 deletions
... | @@ -79,7 +79,7 @@ public class LoyaltyWallet extends Activity implements View.OnClickListener, Vie | ... | @@ -79,7 +79,7 @@ public class LoyaltyWallet extends Activity implements View.OnClickListener, Vie |
79 | private ConstraintLayout mClDealsBanner, mClDealsView, | 79 | private ConstraintLayout mClDealsBanner, mClDealsView, |
80 | mClGiftsBanner, mClToolbar, mClMarket; | 80 | mClGiftsBanner, mClToolbar, mClMarket; |
81 | private LinearLayout mLlQuestionnaire, mLlUserBadge, mLlEmptyWallet, mLlDeals, mLlGifts, | 81 | private LinearLayout mLlQuestionnaire, mLlUserBadge, mLlEmptyWallet, mLlDeals, mLlGifts, |
82 | - mLlMarketView; | 82 | + mLlMarketView, mLlHistory; |
83 | private FlowLayout mLlActiveCodesView; | 83 | private FlowLayout mLlActiveCodesView; |
84 | private float couponDfyValue = 0.0f, mFavValue = 0.0f; | 84 | private float couponDfyValue = 0.0f, mFavValue = 0.0f; |
85 | private RecyclerView mRecyclerCoupons, mRvMarketCoupons; | 85 | private RecyclerView mRecyclerCoupons, mRvMarketCoupons; |
... | @@ -97,7 +97,7 @@ public class LoyaltyWallet extends Activity implements View.OnClickListener, Vie | ... | @@ -97,7 +97,7 @@ public class LoyaltyWallet extends Activity implements View.OnClickListener, Vie |
97 | private CardView mClExp; | 97 | private CardView mClExp; |
98 | private boolean mDfyPressed = false, mDealsBannerPressed = false, mQuestionnairePressed = false, | 98 | private boolean mDfyPressed = false, mDealsBannerPressed = false, mQuestionnairePressed = false, |
99 | mHistoryPressed = false, mHistoryMarketPressed = false, mUnifiedPressed = false, | 99 | mHistoryPressed = false, mHistoryMarketPressed = false, mUnifiedPressed = false, |
100 | - mCouponPressed = false; | 100 | + mCouponPressed = false, mHistoryBadgePressed = false; |
101 | 101 | ||
102 | // =========================================================== | 102 | // =========================================================== |
103 | // Methods for/from SuperClass/Interfaces | 103 | // Methods for/from SuperClass/Interfaces |
... | @@ -146,6 +146,7 @@ public class LoyaltyWallet extends Activity implements View.OnClickListener, Vie | ... | @@ -146,6 +146,7 @@ public class LoyaltyWallet extends Activity implements View.OnClickListener, Vie |
146 | mClMarket = findViewById(R.id.cl_market_inner); | 146 | mClMarket = findViewById(R.id.cl_market_inner); |
147 | mTvFavValue = findViewById(R.id.tv_exp_value); | 147 | mTvFavValue = findViewById(R.id.tv_exp_value); |
148 | mTvFavValueAll = findViewById(R.id.tv_exp_value_all); | 148 | mTvFavValueAll = findViewById(R.id.tv_exp_value_all); |
149 | + mLlHistory = findViewById(R.id.ll_loyalty_history); | ||
149 | 150 | ||
150 | if (WarplyManagerHelper.getActiveDFYCoupons() != null) { | 151 | if (WarplyManagerHelper.getActiveDFYCoupons() != null) { |
151 | Collections.sort(WarplyManagerHelper.getActiveDFYCoupons(), new Comparator<ActiveDFYCouponModel>() { | 152 | Collections.sort(WarplyManagerHelper.getActiveDFYCoupons(), new Comparator<ActiveDFYCouponModel>() { |
... | @@ -209,6 +210,7 @@ public class LoyaltyWallet extends Activity implements View.OnClickListener, Vie | ... | @@ -209,6 +210,7 @@ public class LoyaltyWallet extends Activity implements View.OnClickListener, Vie |
209 | mHistoryMarketPressed = false; | 210 | mHistoryMarketPressed = false; |
210 | mUnifiedPressed = false; | 211 | mUnifiedPressed = false; |
211 | mCouponPressed = false; | 212 | mCouponPressed = false; |
213 | + mHistoryBadgePressed = false; | ||
212 | } | 214 | } |
213 | 215 | ||
214 | @Override | 216 | @Override |
... | @@ -310,6 +312,19 @@ public class LoyaltyWallet extends Activity implements View.OnClickListener, Vie | ... | @@ -310,6 +312,19 @@ public class LoyaltyWallet extends Activity implements View.OnClickListener, Vie |
310 | // } | 312 | // } |
311 | return; | 313 | return; |
312 | } | 314 | } |
315 | + if(view.getId() == R.id.ll_loyalty_history) { | ||
316 | + if(!mHistoryBadgePressed) { | ||
317 | + WarplyAnalyticsManager.logTrackersEvent(this, "click", ("LoyaltyWalletScreen") | ||
318 | + .concat(":") | ||
319 | + .concat("LoyaltyHistoryBadge")); | ||
320 | + | ||
321 | + LoyaltySDKFirebaseEventModel analyticsEvent = new LoyaltySDKFirebaseEventModel(); | ||
322 | + analyticsEvent.setEventName("did_tap_history_badge"); | ||
323 | + analyticsEvent.setParameter("screen", "Loyalty Wallet"); | ||
324 | + EventBus.getDefault().post(new WarplyEventBusManager(analyticsEvent)); | ||
325 | + } | ||
326 | + return; | ||
327 | + } | ||
313 | if (view.getId() == R.id.cl_mygifts) { | 328 | if (view.getId() == R.id.cl_mygifts) { |
314 | if (!mDfyPressed) { | 329 | if (!mDfyPressed) { |
315 | mDfyPressed = true; | 330 | mDfyPressed = true; |
... | @@ -820,6 +835,7 @@ public class LoyaltyWallet extends Activity implements View.OnClickListener, Vie | ... | @@ -820,6 +835,7 @@ public class LoyaltyWallet extends Activity implements View.OnClickListener, Vie |
820 | mSvLoyaltyWallet.setOnScrollChangeListener(this); | 835 | mSvLoyaltyWallet.setOnScrollChangeListener(this); |
821 | mClExp.setOnClickListener(this); | 836 | mClExp.setOnClickListener(this); |
822 | mClMarket.setOnClickListener(this); | 837 | mClMarket.setOnClickListener(this); |
838 | + mLlHistory.setOnClickListener(this); | ||
823 | } | 839 | } |
824 | 840 | ||
825 | private void nonTelcoDialog() { | 841 | private void nonTelcoDialog() { | ... | ... |
1 | <?xml version="1.0" encoding="utf-8"?> | 1 | <?xml version="1.0" encoding="utf-8"?> |
2 | <shape xmlns:android="http://schemas.android.com/apk/res/android"> | 2 | <shape xmlns:android="http://schemas.android.com/apk/res/android"> |
3 | <solid android:color="@color/white"/> | 3 | <solid android:color="@color/white"/> |
4 | - <stroke android:width="1.5dp" android:color="@color/cos_green12" /> | 4 | + <stroke android:width="1dp" android:color="@color/cos_green12" /> |
5 | - <corners android:radius="15dp" /> | 5 | + <corners android:radius="16dp" /> |
6 | </shape> | 6 | </shape> |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
1 | <?xml version="1.0" encoding="utf-8"?> | 1 | <?xml version="1.0" encoding="utf-8"?> |
2 | <shape xmlns:android="http://schemas.android.com/apk/res/android"> | 2 | <shape xmlns:android="http://schemas.android.com/apk/res/android"> |
3 | <solid android:color="@color/white"/> | 3 | <solid android:color="@color/white"/> |
4 | - <stroke android:width="1.5dp" android:color="@color/cos_green6_tr" /> | 4 | + <stroke android:width="1dp" android:color="@color/cos_green6_tr" /> |
5 | - <corners android:radius="15dp" /> | 5 | + <corners android:radius="16dp" /> |
6 | </shape> | 6 | </shape> |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
... | @@ -49,81 +49,109 @@ | ... | @@ -49,81 +49,109 @@ |
49 | android:layout_height="wrap_content" | 49 | android:layout_height="wrap_content" |
50 | android:orientation="vertical"> | 50 | android:orientation="vertical"> |
51 | 51 | ||
52 | - <LinearLayout | 52 | + <androidx.constraintlayout.widget.ConstraintLayout |
53 | android:id="@+id/ll_first_view" | 53 | android:id="@+id/ll_first_view" |
54 | android:layout_width="match_parent" | 54 | android:layout_width="match_parent" |
55 | android:layout_height="wrap_content" | 55 | android:layout_height="wrap_content" |
56 | android:background="@drawable/ic_background_line" | 56 | android:background="@drawable/ic_background_line" |
57 | - android:gravity="center_horizontal" | 57 | + android:orientation="horizontal" |
58 | - android:orientation="vertical" | 58 | + android:paddingHorizontal="16dp" |
59 | android:paddingVertical="24dp"> | 59 | android:paddingVertical="24dp"> |
60 | 60 | ||
61 | <com.google.android.material.imageview.ShapeableImageView | 61 | <com.google.android.material.imageview.ShapeableImageView |
62 | android:id="@+id/iv_profile_photo" | 62 | android:id="@+id/iv_profile_photo" |
63 | - android:layout_width="70dp" | 63 | + android:layout_width="74dp" |
64 | - android:layout_height="70dp" | 64 | + android:layout_height="74dp" |
65 | android:padding="1dp" | 65 | android:padding="1dp" |
66 | android:src="@drawable/ic_default_photo" | 66 | android:src="@drawable/ic_default_photo" |
67 | - app:layout_constraintBottom_toBottomOf="parent" | ||
68 | - app:layout_constraintLeft_toLeftOf="parent" | ||
69 | - app:layout_constraintTop_toTopOf="parent" | ||
70 | app:shapeAppearanceOverlay="@style/ShapeAppearanceProfileImage" | 67 | app:shapeAppearanceOverlay="@style/ShapeAppearanceProfileImage" |
71 | app:strokeColor="@color/cos_grey2" | 68 | app:strokeColor="@color/cos_grey2" |
72 | app:strokeWidth="1dp" | 69 | app:strokeWidth="1dp" |
73 | - tools:background="@color/cos_cyan3" /> | 70 | + app:layout_constraintTop_toTopOf="parent" |
74 | - | 71 | + app:layout_constraintBottom_toBottomOf="parent" |
75 | - <TextView | 72 | + app:layout_constraintStart_toStartOf="parent"/> |
76 | - android:id="@+id/tv_profile_name" | ||
77 | - fontPath="fonts/PeridotPE-Bold.ttf" | ||
78 | - android:layout_width="wrap_content" | ||
79 | - android:layout_height="wrap_content" | ||
80 | - android:layout_marginVertical="6dp" | ||
81 | - android:maxLines="1" | ||
82 | - android:textColor="@color/cos_light_black" | ||
83 | - android:textSize="18sp" | ||
84 | - tools:text="Test Name" /> | ||
85 | 73 | ||
86 | <LinearLayout | 74 | <LinearLayout |
87 | - android:id="@+id/ll_user_badge" | 75 | + android:layout_width="0dp" |
88 | - android:layout_width="wrap_content" | 76 | + android:layout_height="0dp" |
89 | - android:layout_height="42dp" | 77 | + android:layout_marginStart="8dp" |
90 | - android:background="@drawable/selector_button_green_border" | 78 | + app:layout_constraintTop_toTopOf="@+id/iv_profile_photo" |
91 | - android:gravity="center" | 79 | + app:layout_constraintBottom_toBottomOf="@+id/iv_profile_photo" |
92 | - android:visibility="gone" | 80 | + app:layout_constraintStart_toEndOf="@+id/iv_profile_photo" |
93 | - tools:visibility="visible"> | 81 | + app:layout_constraintEnd_toEndOf="parent" |
82 | + android:orientation="vertical"> | ||
94 | 83 | ||
95 | <TextView | 84 | <TextView |
96 | - android:id="@+id/tv_type" | 85 | + android:id="@+id/tv_profile_name" |
97 | - fontPath="fonts/PeridotPE-SemiBold.ttf" | 86 | + fontPath="fonts/PeridotPE-Bold.ttf" |
98 | android:layout_width="wrap_content" | 87 | android:layout_width="wrap_content" |
99 | android:layout_height="wrap_content" | 88 | android:layout_height="wrap_content" |
100 | - android:layout_marginHorizontal="20dp" | 89 | + android:maxLines="1" |
101 | android:includeFontPadding="false" | 90 | android:includeFontPadding="false" |
102 | - android:textColor="@color/cos_green12" | 91 | + android:layout_marginBottom="4dp" |
103 | - android:textSize="16sp" | 92 | + android:textColor="@color/cos_light_black" |
104 | - tools:text="@string/cos_profile_preferences_placeholder" /> | 93 | + android:textSize="22sp" |
105 | - </LinearLayout> | 94 | + tools:text="Test Name" /> |
106 | 95 | ||
107 | - <LinearLayout | 96 | + <LinearLayout |
108 | - android:id="@+id/ll_user_questionnaire" | 97 | + android:layout_width="match_parent" |
109 | - android:layout_width="160dp" | ||
110 | - android:layout_height="42dp" | ||
111 | - android:background="@drawable/selector_button_green_border" | ||
112 | - android:gravity="center" | ||
113 | - android:visibility="gone" | ||
114 | - tools:visibility="gone"> | ||
115 | - | ||
116 | - <TextView | ||
117 | - android:id="@+id/tv_questionnaire" | ||
118 | - fontPath="fonts/PeridotPE-SemiBold.ttf" | ||
119 | - android:layout_width="wrap_content" | ||
120 | android:layout_height="wrap_content" | 98 | android:layout_height="wrap_content" |
121 | - android:includeFontPadding="false" | 99 | + android:orientation="horizontal"> |
122 | - android:text="@string/cos_profile_preferences" | 100 | + |
123 | - android:textColor="@color/cos_green12" | 101 | + <LinearLayout |
124 | - android:textSize="16sp" /> | 102 | + android:id="@+id/ll_user_badge" |
103 | + android:layout_width="wrap_content" | ||
104 | + android:layout_height="42dp" | ||
105 | + android:background="@drawable/selector_button_green_border" | ||
106 | + android:gravity="center" | ||
107 | + android:visibility="gone" | ||
108 | + tools:visibility="gone"> | ||
109 | + | ||
110 | + <TextView | ||
111 | + android:id="@+id/tv_type" | ||
112 | + fontPath="fonts/PeridotPE-SemiBold.ttf" | ||
113 | + android:layout_width="wrap_content" | ||
114 | + android:layout_height="wrap_content" | ||
115 | + android:layout_marginHorizontal="20dp" | ||
116 | + android:includeFontPadding="false" | ||
117 | + android:textColor="@color/cos_green12" | ||
118 | + android:textSize="16sp" | ||
119 | + tools:text="@string/cos_profile_preferences_placeholder" /> | ||
120 | + </LinearLayout> | ||
121 | + | ||
122 | + <LinearLayout | ||
123 | + android:id="@+id/ll_user_questionnaire" | ||
124 | + android:layout_width="160dp" | ||
125 | + android:layout_height="42dp" | ||
126 | + android:background="@drawable/selector_button_green_border" | ||
127 | + android:gravity="center" | ||
128 | + android:visibility="gone" | ||
129 | + tools:visibility="visible"> | ||
130 | + | ||
131 | + <TextView | ||
132 | + android:id="@+id/tv_questionnaire" | ||
133 | + fontPath="fonts/PeridotPE-Bold.ttf" | ||
134 | + android:layout_width="wrap_content" | ||
135 | + android:layout_height="wrap_content" | ||
136 | + android:includeFontPadding="false" | ||
137 | + android:text="@string/cos_profile_preferences" | ||
138 | + android:textColor="@color/cos_green12" | ||
139 | + android:textSize="16sp" /> | ||
140 | + </LinearLayout> | ||
141 | + | ||
142 | + <LinearLayout | ||
143 | + android:id="@+id/ll_loyalty_history" | ||
144 | + android:layout_width="52dp" | ||
145 | + android:layout_height="42dp" | ||
146 | + android:background="@drawable/selector_button_green_border" | ||
147 | + android:gravity="center" | ||
148 | + android:layout_marginStart="4dp" | ||
149 | + android:orientation="vertical"> | ||
150 | + | ||
151 | + </LinearLayout> | ||
152 | + </LinearLayout> | ||
125 | </LinearLayout> | 153 | </LinearLayout> |
126 | - </LinearLayout> | 154 | + </androidx.constraintlayout.widget.ConstraintLayout> |
127 | 155 | ||
128 | <RelativeLayout | 156 | <RelativeLayout |
129 | android:layout_width="match_parent" | 157 | android:layout_width="match_parent" |
... | @@ -484,8 +512,8 @@ | ... | @@ -484,8 +512,8 @@ |
484 | <LinearLayout | 512 | <LinearLayout |
485 | android:layout_width="0dp" | 513 | android:layout_width="0dp" |
486 | android:layout_height="wrap_content" | 514 | android:layout_height="wrap_content" |
487 | - android:layout_marginEnd="24dp" | ||
488 | android:layout_marginStart="20dp" | 515 | android:layout_marginStart="20dp" |
516 | + android:layout_marginEnd="24dp" | ||
489 | android:orientation="vertical" | 517 | android:orientation="vertical" |
490 | app:layout_constraintBottom_toBottomOf="parent" | 518 | app:layout_constraintBottom_toBottomOf="parent" |
491 | app:layout_constraintEnd_toStartOf="@+id/iv_deals_circle" | 519 | app:layout_constraintEnd_toStartOf="@+id/iv_deals_circle" | ... | ... |
-
Please register or login to post a comment