Panagiotis Triantafyllou

merge with redesign branch part1

...@@ -2,7 +2,7 @@ apply plugin: 'com.android.library' ...@@ -2,7 +2,7 @@ apply plugin: 'com.android.library'
2 2
3 ext { 3 ext {
4 PUBLISH_GROUP_ID = 'ly.warp' 4 PUBLISH_GROUP_ID = 'ly.warp'
5 - PUBLISH_VERSION = '4.5.4.6rc52' 5 + PUBLISH_VERSION = '4.5.4.6rc53'
6 PUBLISH_ARTIFACT_ID = 'warply-android-sdk' 6 PUBLISH_ARTIFACT_ID = 'warply-android-sdk'
7 } 7 }
8 8
......
...@@ -13,6 +13,7 @@ import android.widget.LinearLayout; ...@@ -13,6 +13,7 @@ import android.widget.LinearLayout;
13 import android.widget.RelativeLayout; 13 import android.widget.RelativeLayout;
14 import android.widget.TextView; 14 import android.widget.TextView;
15 15
16 +import androidx.cardview.widget.CardView;
16 import androidx.core.content.ContextCompat; 17 import androidx.core.content.ContextCompat;
17 import androidx.recyclerview.widget.LinearLayoutManager; 18 import androidx.recyclerview.widget.LinearLayoutManager;
18 import androidx.recyclerview.widget.RecyclerView; 19 import androidx.recyclerview.widget.RecyclerView;
...@@ -58,7 +59,8 @@ public class LoyaltyAnalysisActivity extends Activity implements View.OnClickLis ...@@ -58,7 +59,8 @@ public class LoyaltyAnalysisActivity extends Activity implements View.OnClickLis
58 private ExpiredCouponAdapter mAdapterExpiredCoupons; 59 private ExpiredCouponAdapter mAdapterExpiredCoupons;
59 private SharedCouponAdapter mAdapterSharedCoupons; 60 private SharedCouponAdapter mAdapterSharedCoupons;
60 private LinearLayout mLlExpiredTab, mLlSharedTab, mLlShowMoreExpired, mLlShowMoreShared; 61 private LinearLayout mLlExpiredTab, mLlSharedTab, mLlShowMoreExpired, mLlShowMoreShared;
61 - private RelativeLayout mRlExpiredView, mRlSharedView; 62 + private RelativeLayout mRlExpiredView;
63 + private CardView mRlSharedView;
62 private SharingList mSharedCoupons = new SharingList(); 64 private SharingList mSharedCoupons = new SharingList();
63 private int mTimer = 0; 65 private int mTimer = 0;
64 private Handler mSecondsHandler; 66 private Handler mSecondsHandler;
......
...@@ -136,11 +136,12 @@ public class ExpiredCouponAdapter extends RecyclerView.Adapter<ExpiredCouponAdap ...@@ -136,11 +136,12 @@ public class ExpiredCouponAdapter extends RecyclerView.Adapter<ExpiredCouponAdap
136 Date newDate = new Date(); 136 Date newDate = new Date();
137 try { 137 try {
138 newDate = simpleDateFormat.parse(couponItem.getChangesDates().optString("redeemed")); 138 newDate = simpleDateFormat.parse(couponItem.getChangesDates().optString("redeemed"));
139 + simpleDateFormat = new SimpleDateFormat("dd/MM/yyyy");
140 + holder.tvCouponDate.setText(simpleDateFormat.format(newDate != null ? newDate : ""));
139 } catch (ParseException e) { 141 } catch (ParseException e) {
140 e.printStackTrace(); 142 e.printStackTrace();
143 + holder.tvCouponDate.setVisibility(View.GONE);
141 } 144 }
142 - simpleDateFormat = new SimpleDateFormat("dd/MM/yyyy");
143 - holder.tvCouponDate.setText(simpleDateFormat.format(newDate != null ? newDate : ""));
144 145
145 String itemValue = String.format("%.02f", Float.valueOf(couponItem.getDiscount())); 146 String itemValue = String.format("%.02f", Float.valueOf(couponItem.getDiscount()));
146 holder.tvCouponValue.setText(itemValue + mContext.getResources().getString(R.string.euro)); 147 holder.tvCouponValue.setText(itemValue + mContext.getResources().getString(R.string.euro));
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
2 <shape xmlns:android="http://schemas.android.com/apk/res/android" 2 <shape xmlns:android="http://schemas.android.com/apk/res/android"
3 android:shape="rectangle"> 3 android:shape="rectangle">
4 <corners android:radius="16dp" /> 4 <corners android:radius="16dp" />
5 - <stroke android:width="1dp" android:color="@color/cos_grey2" /> 5 +<!-- <stroke android:width="1dp" android:color="@color/cos_grey2" />-->
6 <solid 6 <solid
7 android:color="@color/white" /> 7 android:color="@color/white" />
8 </shape> 8 </shape>
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -6,8 +6,8 @@ ...@@ -6,8 +6,8 @@
6 android:layout_width="match_parent" 6 android:layout_width="match_parent"
7 android:layout_height="150dp" 7 android:layout_height="150dp"
8 android:layout_marginHorizontal="6dp" 8 android:layout_marginHorizontal="6dp"
9 - android:layout_marginVertical="6dp" 9 + android:layout_marginBottom="3dp"
10 - android:background="@drawable/ic_coupon_background_new2"> 10 + android:background="@drawable/ic_coupon_background_new3">
11 11
12 <androidx.constraintlayout.widget.Guideline 12 <androidx.constraintlayout.widget.Guideline
13 android:id="@+id/gl_vertical_72_percent" 13 android:id="@+id/gl_vertical_72_percent"
...@@ -92,8 +92,8 @@ ...@@ -92,8 +92,8 @@
92 fontPath="fonts/PeridotPE-Regular.ttf" 92 fontPath="fonts/PeridotPE-Regular.ttf"
93 android:layout_width="0dp" 93 android:layout_width="0dp"
94 android:layout_height="wrap_content" 94 android:layout_height="wrap_content"
95 - android:maxLines="3"
96 android:ellipsize="end" 95 android:ellipsize="end"
96 + android:maxLines="3"
97 android:textColor="@color/cos_light_black" 97 android:textColor="@color/cos_light_black"
98 android:textSize="12sp" 98 android:textSize="12sp"
99 app:layout_constraintBottom_toBottomOf="parent" 99 app:layout_constraintBottom_toBottomOf="parent"
......
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
54 android:orientation="vertical" 54 android:orientation="vertical"
55 android:overScrollMode="never" 55 android:overScrollMode="never"
56 android:scrollbars="none" 56 android:scrollbars="none"
57 - android:paddingVertical="24dp" /> 57 + android:paddingVertical="16dp" />
58 </RelativeLayout> 58 </RelativeLayout>
59 59
60 <TextView 60 <TextView
......
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
59 <ImageView 59 <ImageView
60 android:id="@+id/imageView6" 60 android:id="@+id/imageView6"
61 android:layout_width="match_parent" 61 android:layout_width="match_parent"
62 - android:layout_height="295dp" 62 + android:layout_height="255dp"
63 android:scaleType="centerCrop" 63 android:scaleType="centerCrop"
64 app:layout_constraintStart_toStartOf="parent" 64 app:layout_constraintStart_toStartOf="parent"
65 app:layout_constraintTop_toTopOf="parent" 65 app:layout_constraintTop_toTopOf="parent"
......
...@@ -43,8 +43,8 @@ ...@@ -43,8 +43,8 @@
43 <ScrollView 43 <ScrollView
44 android:layout_width="match_parent" 44 android:layout_width="match_parent"
45 android:layout_height="match_parent" 45 android:layout_height="match_parent"
46 - android:scrollbars="none" 46 + android:overScrollMode="never"
47 - android:overScrollMode="never"> 47 + android:scrollbars="none">
48 48
49 <LinearLayout 49 <LinearLayout
50 android:id="@+id/cl_loyalty_info_view_inner" 50 android:id="@+id/cl_loyalty_info_view_inner"
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
57 <ImageView 57 <ImageView
58 android:id="@+id/imageView6" 58 android:id="@+id/imageView6"
59 android:layout_width="match_parent" 59 android:layout_width="match_parent"
60 - android:layout_height="295dp" 60 + android:layout_height="255dp"
61 android:scaleType="centerCrop" 61 android:scaleType="centerCrop"
62 tools:src="@drawable/carousel_banner" /> 62 tools:src="@drawable/carousel_banner" />
63 63
...@@ -115,9 +115,9 @@ ...@@ -115,9 +115,9 @@
115 android:layout_height="50dp" 115 android:layout_height="50dp"
116 android:layout_marginHorizontal="32dp" 116 android:layout_marginHorizontal="32dp"
117 android:layout_marginTop="12dp" 117 android:layout_marginTop="12dp"
118 - android:includeFontPadding="false"
119 android:background="@drawable/banner_border_light_grey" 118 android:background="@drawable/banner_border_light_grey"
120 android:gravity="center" 119 android:gravity="center"
120 + android:includeFontPadding="false"
121 android:textColor="@color/cos_light_black" 121 android:textColor="@color/cos_light_black"
122 android:textIsSelectable="true" 122 android:textIsSelectable="true"
123 android:textSize="25sp" 123 android:textSize="25sp"
...@@ -129,8 +129,8 @@ ...@@ -129,8 +129,8 @@
129 android:layout_height="wrap_content" 129 android:layout_height="wrap_content"
130 android:layout_marginTop="20dp" 130 android:layout_marginTop="20dp"
131 android:gravity="center" 131 android:gravity="center"
132 - android:visibility="gone" 132 + android:orientation="vertical"
133 - android:orientation="vertical"> 133 + android:visibility="gone">
134 134
135 <LinearLayout 135 <LinearLayout
136 android:id="@+id/ll_barcode_container_items" 136 android:id="@+id/ll_barcode_container_items"
...@@ -144,8 +144,8 @@ ...@@ -144,8 +144,8 @@
144 <View 144 <View
145 android:id="@+id/view5" 145 android:id="@+id/view5"
146 android:layout_width="match_parent" 146 android:layout_width="match_parent"
147 - android:layout_marginHorizontal="32dp"
148 android:layout_height="0.8dp" 147 android:layout_height="0.8dp"
148 + android:layout_marginHorizontal="32dp"
149 android:background="#E6E6E6" /> 149 android:background="#E6E6E6" />
150 150
151 <ImageView 151 <ImageView
...@@ -169,8 +169,8 @@ ...@@ -169,8 +169,8 @@
169 <View 169 <View
170 android:id="@+id/view4" 170 android:id="@+id/view4"
171 android:layout_width="match_parent" 171 android:layout_width="match_parent"
172 - android:layout_marginHorizontal="32dp"
173 android:layout_height="0.8dp" 172 android:layout_height="0.8dp"
173 + android:layout_marginHorizontal="32dp"
174 android:layout_marginTop="20dp" 174 android:layout_marginTop="20dp"
175 android:background="#E6E6E6" /> 175 android:background="#E6E6E6" />
176 </LinearLayout> 176 </LinearLayout>
...@@ -181,9 +181,9 @@ ...@@ -181,9 +181,9 @@
181 android:layout_height="wrap_content" 181 android:layout_height="wrap_content"
182 android:layout_marginTop="20dp" 182 android:layout_marginTop="20dp"
183 android:gravity="center" 183 android:gravity="center"
184 + android:orientation="horizontal"
184 android:visibility="gone" 185 android:visibility="gone"
185 - tools:visibility="visible" 186 + tools:visibility="visible">
186 - android:orientation="horizontal">
187 187
188 <TextView 188 <TextView
189 android:id="@+id/tv_barcode" 189 android:id="@+id/tv_barcode"
...@@ -211,8 +211,8 @@ ...@@ -211,8 +211,8 @@
211 android:layout_height="wrap_content" 211 android:layout_height="wrap_content"
212 android:layout_gravity="center" 212 android:layout_gravity="center"
213 android:layout_marginTop="24dp" 213 android:layout_marginTop="24dp"
214 + android:textColor="@color/cos_light_black"
214 android:textSize="16sp" 215 android:textSize="16sp"
215 - android:textColor="@color/cos_gray"
216 tools:text="@string/cos_coupon_date" /> 216 tools:text="@string/cos_coupon_date" />
217 217
218 <LinearLayout 218 <LinearLayout
...@@ -317,8 +317,8 @@ ...@@ -317,8 +317,8 @@
317 android:id="@+id/iv_terms_arrow" 317 android:id="@+id/iv_terms_arrow"
318 android:layout_width="14dp" 318 android:layout_width="14dp"
319 android:layout_height="14dp" 319 android:layout_height="14dp"
320 - android:layout_marginTop="3dp"
321 android:layout_marginStart="6dp" 320 android:layout_marginStart="6dp"
321 + android:layout_marginTop="3dp"
322 android:src="@drawable/ic_down_dark_new" /> 322 android:src="@drawable/ic_down_dark_new" />
323 </LinearLayout> 323 </LinearLayout>
324 324
...@@ -330,7 +330,7 @@ ...@@ -330,7 +330,7 @@
330 android:layout_below="@+id/ll_terms_inner" 330 android:layout_below="@+id/ll_terms_inner"
331 android:layout_marginHorizontal="32dp" 331 android:layout_marginHorizontal="32dp"
332 android:layout_marginTop="16dp" 332 android:layout_marginTop="16dp"
333 - android:textColor="@color/cos_gray" 333 + android:textColor="@color/cos_light_black"
334 android:textSize="16sp" 334 android:textSize="16sp"
335 android:visibility="gone" 335 android:visibility="gone"
336 tools:text="@string/cos_coupon_date" 336 tools:text="@string/cos_coupon_date"
......
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
59 <ImageView 59 <ImageView
60 android:id="@+id/imageView6" 60 android:id="@+id/imageView6"
61 android:layout_width="match_parent" 61 android:layout_width="match_parent"
62 - android:layout_height="295dp" 62 + android:layout_height="255dp"
63 android:scaleType="centerCrop" 63 android:scaleType="centerCrop"
64 app:layout_constraintStart_toStartOf="parent" 64 app:layout_constraintStart_toStartOf="parent"
65 app:layout_constraintTop_toTopOf="parent" 65 app:layout_constraintTop_toTopOf="parent"
......
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
55 <ImageView 55 <ImageView
56 android:id="@+id/imageView6" 56 android:id="@+id/imageView6"
57 android:layout_width="match_parent" 57 android:layout_width="match_parent"
58 - android:layout_height="295dp" 58 + android:layout_height="255dp"
59 android:scaleType="centerCrop" 59 android:scaleType="centerCrop"
60 tools:src="@drawable/carousel_banner" /> 60 tools:src="@drawable/carousel_banner" />
61 61
...@@ -144,7 +144,7 @@ ...@@ -144,7 +144,7 @@
144 android:layout_below="@+id/ll_terms_inner" 144 android:layout_below="@+id/ll_terms_inner"
145 android:layout_marginHorizontal="32dp" 145 android:layout_marginHorizontal="32dp"
146 android:layout_marginTop="16dp" 146 android:layout_marginTop="16dp"
147 - android:textColor="@color/cos_gray" 147 + android:textColor="@color/cos_light_black"
148 android:textSize="16sp" 148 android:textSize="16sp"
149 android:visibility="gone" 149 android:visibility="gone"
150 tools:text="@string/cos_coupon_date" 150 tools:text="@string/cos_coupon_date"
......
...@@ -16,8 +16,8 @@ ...@@ -16,8 +16,8 @@
16 android:layout_width="48dp" 16 android:layout_width="48dp"
17 android:layout_height="48dp" 17 android:layout_height="48dp"
18 android:layout_marginStart="16dp" 18 android:layout_marginStart="16dp"
19 - android:src="@drawable/ic_close"
20 android:scaleType="centerInside" 19 android:scaleType="centerInside"
20 + android:src="@drawable/ic_close"
21 app:layout_constraintBottom_toBottomOf="parent" 21 app:layout_constraintBottom_toBottomOf="parent"
22 app:layout_constraintStart_toStartOf="parent" 22 app:layout_constraintStart_toStartOf="parent"
23 app:layout_constraintTop_toTopOf="parent" /> 23 app:layout_constraintTop_toTopOf="parent" />
...@@ -41,15 +41,15 @@ ...@@ -41,15 +41,15 @@
41 android:layout_height="match_parent" 41 android:layout_height="match_parent"
42 android:layout_below="@+id/cl_loyalty_wallet_header" 42 android:layout_below="@+id/cl_loyalty_wallet_header"
43 android:background="@color/white" 43 android:background="@color/white"
44 - android:scrollbars="none" 44 + android:fillViewport="true"
45 - android:fillViewport="true"> 45 + android:scrollbars="none">
46 46
47 <androidx.constraintlayout.widget.ConstraintLayout 47 <androidx.constraintlayout.widget.ConstraintLayout
48 android:layout_width="match_parent" 48 android:layout_width="match_parent"
49 android:layout_height="match_parent" 49 android:layout_height="match_parent"
50 android:background="@color/white"> 50 android:background="@color/white">
51 51
52 -<!-- android:background="@drawable/shape_cos_loyalty_white"--> 52 + <!-- android:background="@drawable/shape_cos_loyalty_white"-->
53 <RelativeLayout 53 <RelativeLayout
54 android:id="@+id/cl_loyalty_info_view_inner" 54 android:id="@+id/cl_loyalty_info_view_inner"
55 android:layout_width="match_parent" 55 android:layout_width="match_parent"
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
63 <ImageView 63 <ImageView
64 android:id="@+id/imageView6" 64 android:id="@+id/imageView6"
65 android:layout_width="match_parent" 65 android:layout_width="match_parent"
66 - android:layout_height="295dp" 66 + android:layout_height="255dp"
67 android:layout_centerHorizontal="true" 67 android:layout_centerHorizontal="true"
68 android:scaleType="centerCrop" 68 android:scaleType="centerCrop"
69 tools:src="@drawable/carousel_banner" /> 69 tools:src="@drawable/carousel_banner" />
...@@ -200,8 +200,8 @@ ...@@ -200,8 +200,8 @@
200 android:id="@+id/iv_see_more_arrow" 200 android:id="@+id/iv_see_more_arrow"
201 android:layout_width="14dp" 201 android:layout_width="14dp"
202 android:layout_height="14dp" 202 android:layout_height="14dp"
203 - android:layout_marginTop="3dp"
204 android:layout_marginStart="6dp" 203 android:layout_marginStart="6dp"
204 + android:layout_marginTop="3dp"
205 android:src="@drawable/ic_down_dark_new" /> 205 android:src="@drawable/ic_down_dark_new" />
206 </LinearLayout> 206 </LinearLayout>
207 207
...@@ -213,11 +213,11 @@ ...@@ -213,11 +213,11 @@
213 android:layout_below="@+id/ll_see_more" 213 android:layout_below="@+id/ll_see_more"
214 android:layout_marginHorizontal="32dp" 214 android:layout_marginHorizontal="32dp"
215 android:layout_marginTop="16dp" 215 android:layout_marginTop="16dp"
216 - android:textColor="@color/cos_gray" 216 + android:textColor="@color/cos_light_black"
217 android:textSize="16sp" 217 android:textSize="16sp"
218 android:visibility="gone" 218 android:visibility="gone"
219 - tools:visibility="visible" 219 + tools:text="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. "
220 - tools:text="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. " /> 220 + tools:visibility="visible" />
221 </RelativeLayout> 221 </RelativeLayout>
222 222
223 </RelativeLayout> 223 </RelativeLayout>
......
...@@ -10,13 +10,13 @@ ...@@ -10,13 +10,13 @@
10 android:layout_width="match_parent" 10 android:layout_width="match_parent"
11 android:layout_height="match_parent" 11 android:layout_height="match_parent"
12 android:layout_marginHorizontal="16dp" 12 android:layout_marginHorizontal="16dp"
13 - app:cardElevation="0dp" 13 + android:layout_marginBottom="2dp"
14 - app:cardCornerRadius="16dp"> 14 + app:cardCornerRadius="16dp"
15 + app:cardElevation="2dp">
15 16
16 <androidx.constraintlayout.widget.ConstraintLayout 17 <androidx.constraintlayout.widget.ConstraintLayout
17 android:layout_width="match_parent" 18 android:layout_width="match_parent"
18 - android:layout_height="match_parent" 19 + android:layout_height="match_parent">
19 - android:background="@drawable/selector_cos_campaign">
20 20
21 <androidx.constraintlayout.widget.Guideline 21 <androidx.constraintlayout.widget.Guideline
22 android:id="@+id/gl_vertical_60_percent" 22 android:id="@+id/gl_vertical_60_percent"
...@@ -38,13 +38,13 @@ ...@@ -38,13 +38,13 @@
38 38
39 <TextView 39 <TextView
40 android:id="@+id/tv_campaign_title" 40 android:id="@+id/tv_campaign_title"
41 + fontPath="fonts/PeridotPE-Regular.ttf"
41 android:layout_width="0dp" 42 android:layout_width="0dp"
42 android:layout_height="wrap_content" 43 android:layout_height="wrap_content"
43 android:layout_marginHorizontal="12dp" 44 android:layout_marginHorizontal="12dp"
44 android:gravity="center" 45 android:gravity="center"
45 android:maxLines="4" 46 android:maxLines="4"
46 android:textColor="@color/cos_light_black" 47 android:textColor="@color/cos_light_black"
47 - fontPath="fonts/PeridotPE-Regular.ttf"
48 app:layout_constraintBottom_toBottomOf="parent" 48 app:layout_constraintBottom_toBottomOf="parent"
49 app:layout_constraintLeft_toRightOf="@+id/gl_vertical_60_percent" 49 app:layout_constraintLeft_toRightOf="@+id/gl_vertical_60_percent"
50 app:layout_constraintRight_toRightOf="parent" 50 app:layout_constraintRight_toRightOf="parent"
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
62 android:layout_marginEnd="10dp" 62 android:layout_marginEnd="10dp"
63 android:scaleType="centerCrop" 63 android:scaleType="centerCrop"
64 android:src="@drawable/ic_new_icon" 64 android:src="@drawable/ic_new_icon"
65 - android:translationZ="2dp" 65 + android:translationZ="5dp"
66 android:visibility="gone" 66 android:visibility="gone"
67 app:layout_constraintEnd_toEndOf="parent" 67 app:layout_constraintEnd_toEndOf="parent"
68 app:layout_constraintTop_toTopOf="parent" 68 app:layout_constraintTop_toTopOf="parent"
......