Panagiotis Triantafyllou

redesign part1

...@@ -59,8 +59,7 @@ public class SingleCouponsetActivity extends Activity implements View.OnClickLis ...@@ -59,8 +59,7 @@ public class SingleCouponsetActivity extends Activity implements View.OnClickLis
59 private ImageView mIvTermsArrow; 59 private ImageView mIvTermsArrow;
60 private TextView mTvTermsText; 60 private TextView mTvTermsText;
61 private boolean mIsTermsExpanded = false; 61 private boolean mIsTermsExpanded = false;
62 - 62 + private TextView mTvTermsTitle, mTvRedeemTitle, mTvMerchantName;
63 - private TextView mTvHeaderTitle, mTvTermsTitle, mTvRedeemTitle, mTVMoreTitle;
64 63
65 64
66 // =========================================================== 65 // ===========================================================
...@@ -122,6 +121,7 @@ public class SingleCouponsetActivity extends Activity implements View.OnClickLis ...@@ -122,6 +121,7 @@ public class SingleCouponsetActivity extends Activity implements View.OnClickLis
122 mTvValue = findViewById(R.id.tv_coupon_value); 121 mTvValue = findViewById(R.id.tv_coupon_value);
123 mIvImage = findViewById(R.id.iv_coupon_image); 122 mIvImage = findViewById(R.id.iv_coupon_image);
124 mTvMoreButton = findViewById(R.id.tv_more_button); 123 mTvMoreButton = findViewById(R.id.tv_more_button);
124 + mTvMerchantName = findViewById(R.id.tv_merchant_value);
125 125
126 // Initialize Terms of Use section 126 // Initialize Terms of Use section
127 mTermsContainer = findViewById(R.id.terms_container); 127 mTermsContainer = findViewById(R.id.terms_container);
...@@ -130,17 +130,15 @@ public class SingleCouponsetActivity extends Activity implements View.OnClickLis ...@@ -130,17 +130,15 @@ public class SingleCouponsetActivity extends Activity implements View.OnClickLis
130 mIvTermsArrow = findViewById(R.id.iv_terms_arrow); 130 mIvTermsArrow = findViewById(R.id.iv_terms_arrow);
131 mTvTermsText = findViewById(R.id.tv_terms_text); 131 mTvTermsText = findViewById(R.id.tv_terms_text);
132 132
133 - mTvHeaderTitle = findViewById(R.id.tv_header_title);
134 mTvTermsTitle = findViewById(R.id.tv_terms_title); 133 mTvTermsTitle = findViewById(R.id.tv_terms_title);
135 mTvRedeemTitle = findViewById(R.id.tv_redeem_title); 134 mTvRedeemTitle = findViewById(R.id.tv_redeem_title);
136 - mTVMoreTitle = findViewById(R.id.tv_more_title);
137 135
138 - WarpUtils.renderCustomFont(this, R.font.ping_lcg_bold, mTvHeaderTitle, mTvValue, 136 + WarpUtils.renderCustomFont(this, R.font.ping_lcg_bold, mTvValue,
139 - mTvTermsTitle, mTvRedeemTitle); 137 + mTvTermsTitle, mTvMoreButton, mTvMerchantName,
138 + mTvEndDate);
140 139
141 WarpUtils.renderCustomFont(this, R.font.ping_lcg_regular, mTvSmallDescription, 140 WarpUtils.renderCustomFont(this, R.font.ping_lcg_regular, mTvSmallDescription,
142 - mTvEndDate, mTvFullDescription, mTvTermsText, 141 + mTvFullDescription, mTvTermsText, mTvRedeemTitle);
143 - mTVMoreTitle, mTvMoreButton);
144 142
145 if (mOfferItem != null) { 143 if (mOfferItem != null) {
146 if (mOfferItem.getEndDate() != null && !mOfferItem.getEndDate().isEmpty()) { 144 if (mOfferItem.getEndDate() != null && !mOfferItem.getEndDate().isEmpty()) {
...@@ -162,6 +160,8 @@ public class SingleCouponsetActivity extends Activity implements View.OnClickLis ...@@ -162,6 +160,8 @@ public class SingleCouponsetActivity extends Activity implements View.OnClickLis
162 .into(mIvImage); 160 .into(mIvImage);
163 } 161 }
164 162
163 + if (!TextUtils.isEmpty(mOfferItem.getAdmin_name()))
164 + mTvMerchantName.setText(mOfferItem.getAdmin_name());
165 if (!TextUtils.isEmpty(mOfferItem.getName())) 165 if (!TextUtils.isEmpty(mOfferItem.getName()))
166 mTvValue.setText(mOfferItem.getName()); 166 mTvValue.setText(mOfferItem.getName());
167 if (!TextUtils.isEmpty(mOfferItem.getShort_description())) 167 if (!TextUtils.isEmpty(mOfferItem.getShort_description()))
...@@ -252,13 +252,13 @@ public class SingleCouponsetActivity extends Activity implements View.OnClickLis ...@@ -252,13 +252,13 @@ public class SingleCouponsetActivity extends Activity implements View.OnClickLis
252 SimpleDateFormat inputFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.getDefault()); 252 SimpleDateFormat inputFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.getDefault());
253 Date date = inputFormat.parse(endDate); 253 Date date = inputFormat.parse(endDate);
254 SimpleDateFormat outputFormat = new SimpleDateFormat("dd-MM", Locale.getDefault()); 254 SimpleDateFormat outputFormat = new SimpleDateFormat("dd-MM", Locale.getDefault());
255 - return "έως " + outputFormat.format(date); 255 + return outputFormat.format(date);
256 } catch (ParseException e) { 256 } catch (ParseException e) {
257 try { 257 try {
258 SimpleDateFormat inputFormat2 = new SimpleDateFormat("yyyy-MM-dd HH:mm", Locale.getDefault()); 258 SimpleDateFormat inputFormat2 = new SimpleDateFormat("yyyy-MM-dd HH:mm", Locale.getDefault());
259 Date date = inputFormat2.parse(endDate); 259 Date date = inputFormat2.parse(endDate);
260 SimpleDateFormat outputFormat = new SimpleDateFormat("dd-MM", Locale.getDefault()); 260 SimpleDateFormat outputFormat = new SimpleDateFormat("dd-MM", Locale.getDefault());
261 - return "έως " + outputFormat.format(date); 261 + return outputFormat.format(date);
262 } catch (ParseException e2) { 262 } catch (ParseException e2) {
263 return endDate; 263 return endDate;
264 } 264 }
......
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<shape xmlns:android="http://schemas.android.com/apk/res/android"
3 + android:shape="rectangle">
4 + <corners android:radius="6dp" />
5 +
6 + <solid android:color="@color/custom_skyblue4" />
7 + <stroke
8 + android:width="1dp"
9 + android:color="@color/custom_skyblue5" />
10 +</shape>
...\ No newline at end of file ...\ No newline at end of file
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<shape xmlns:android="http://schemas.android.com/apk/res/android"
3 + android:shape="oval">
4 + <corners android:radius="1000dp" />
5 +
6 + <solid android:color="@android:color/white" />
7 +</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 android:shape="rectangle"> 3 android:shape="rectangle">
4 - <corners android:radius="16dp" /> 4 + <corners android:radius="1000dp" />
5 5
6 <solid 6 <solid
7 android:width="2dp" 7 android:width="2dp"
......
...@@ -131,7 +131,7 @@ ...@@ -131,7 +131,7 @@
131 android:layout_width="match_parent" 131 android:layout_width="match_parent"
132 android:layout_height="45dp" 132 android:layout_height="45dp"
133 android:layout_marginTop="16dp" 133 android:layout_marginTop="16dp"
134 - android:background="@drawable/selector_button_light_blue" 134 + android:background="@drawable/shape_rectangle_rounded_light_blue_tr"
135 android:gravity="center" 135 android:gravity="center"
136 android:orientation="horizontal"> 136 android:orientation="horizontal">
137 137
......
...@@ -23,4 +23,11 @@ ...@@ -23,4 +23,11 @@
23 <color name="custom_grey2">#D8D8D8</color> 23 <color name="custom_grey2">#D8D8D8</color>
24 <color name="custom_pink3">#EE437E</color> 24 <color name="custom_pink3">#EE437E</color>
25 <color name="custom_light_blue">#00A5E3</color> 25 <color name="custom_light_blue">#00A5E3</color>
26 + <color name="custom_skyblue3">#00A3E01A</color>
27 + <color name="custom_grey3">#5C6369</color>
28 + <color name="custom_black6">#1D2023</color>
29 + <color name="custom_grey4">#9BA1A6</color>
30 + <color name="custom_black7">#002430</color>
31 + <color name="custom_skyblue4">#DDEFFB</color>
32 + <color name="custom_skyblue5">#CCE9FB</color>
26 </resources> 33 </resources>
......
...@@ -9,19 +9,19 @@ ...@@ -9,19 +9,19 @@
9 <string name="demo_login">Σύνδεση</string> 9 <string name="demo_login">Σύνδεση</string>
10 <string name="demo_all">Όλα</string> 10 <string name="demo_all">Όλα</string>
11 <string name="demo_offer">Προσφορά</string> 11 <string name="demo_offer">Προσφορά</string>
12 - <string name="demo_more">Περισσότερα</string> 12 + <string name="demo_more">View more</string>
13 <string name="demo_less">Λιγότερα</string> 13 <string name="demo_less">Λιγότερα</string>
14 <string name="demo_purchases">για αγορές</string> 14 <string name="demo_purchases">για αγορές</string>
15 - <string name="demo_valid_until">Η προσφορά ισχύει έως %1$s</string> 15 + <string name="demo_valid_until">Valid until %1$s</string>
16 <string name="demo_coupon_code">Κωδικός Κουπονιού</string> 16 <string name="demo_coupon_code">Κωδικός Κουπονιού</string>
17 <string name="demo_qr_code">QR Κουπονιού</string> 17 <string name="demo_qr_code">QR Κουπονιού</string>
18 <string name="demo_barcode_code">Barcode Κουπονιού</string> 18 <string name="demo_barcode_code">Barcode Κουπονιού</string>
19 - <string name="demo_terms">Όροι Χρήσης</string> 19 + <string name="demo_terms">Offer terms of use</string>
20 <string name="demo_copy_success">Ο κωδικός αντιγράφηκε στο πρόχειρο</string> 20 <string name="demo_copy_success">Ο κωδικός αντιγράφηκε στο πρόχειρο</string>
21 <string name="demo_lorem_ipsum">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</string> 21 <string name="demo_lorem_ipsum">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</string>
22 <string name="demo_shops">Καταστήματα κοντά μου</string> 22 <string name="demo_shops">Καταστήματα κοντά μου</string>
23 <string name="demo_website">Δες το website</string> 23 <string name="demo_website">Δες το website</string>
24 - <string name="demo_redeem">Απόκτησε το κουπόνι</string> 24 + <string name="demo_redeem">Get coupon</string>
25 <string name="demo_profile">Το προφίλ μου</string> 25 <string name="demo_profile">Το προφίλ μου</string>
26 <string name="demo_my_coupons">Τα κουπόνια μου</string> 26 <string name="demo_my_coupons">Τα κουπόνια μου</string>
27 <string name="demo_active">Ενεργά</string> 27 <string name="demo_active">Ενεργά</string>
......