Panagiotis Triantafyllou

redesign part1

......@@ -59,8 +59,7 @@ public class SingleCouponsetActivity extends Activity implements View.OnClickLis
private ImageView mIvTermsArrow;
private TextView mTvTermsText;
private boolean mIsTermsExpanded = false;
private TextView mTvHeaderTitle, mTvTermsTitle, mTvRedeemTitle, mTVMoreTitle;
private TextView mTvTermsTitle, mTvRedeemTitle, mTvMerchantName;
// ===========================================================
......@@ -122,6 +121,7 @@ public class SingleCouponsetActivity extends Activity implements View.OnClickLis
mTvValue = findViewById(R.id.tv_coupon_value);
mIvImage = findViewById(R.id.iv_coupon_image);
mTvMoreButton = findViewById(R.id.tv_more_button);
mTvMerchantName = findViewById(R.id.tv_merchant_value);
// Initialize Terms of Use section
mTermsContainer = findViewById(R.id.terms_container);
......@@ -130,17 +130,15 @@ public class SingleCouponsetActivity extends Activity implements View.OnClickLis
mIvTermsArrow = findViewById(R.id.iv_terms_arrow);
mTvTermsText = findViewById(R.id.tv_terms_text);
mTvHeaderTitle = findViewById(R.id.tv_header_title);
mTvTermsTitle = findViewById(R.id.tv_terms_title);
mTvRedeemTitle = findViewById(R.id.tv_redeem_title);
mTVMoreTitle = findViewById(R.id.tv_more_title);
WarpUtils.renderCustomFont(this, R.font.ping_lcg_bold, mTvHeaderTitle, mTvValue,
mTvTermsTitle, mTvRedeemTitle);
WarpUtils.renderCustomFont(this, R.font.ping_lcg_bold, mTvValue,
mTvTermsTitle, mTvMoreButton, mTvMerchantName,
mTvEndDate);
WarpUtils.renderCustomFont(this, R.font.ping_lcg_regular, mTvSmallDescription,
mTvEndDate, mTvFullDescription, mTvTermsText,
mTVMoreTitle, mTvMoreButton);
mTvFullDescription, mTvTermsText, mTvRedeemTitle);
if (mOfferItem != null) {
if (mOfferItem.getEndDate() != null && !mOfferItem.getEndDate().isEmpty()) {
......@@ -162,6 +160,8 @@ public class SingleCouponsetActivity extends Activity implements View.OnClickLis
.into(mIvImage);
}
if (!TextUtils.isEmpty(mOfferItem.getAdmin_name()))
mTvMerchantName.setText(mOfferItem.getAdmin_name());
if (!TextUtils.isEmpty(mOfferItem.getName()))
mTvValue.setText(mOfferItem.getName());
if (!TextUtils.isEmpty(mOfferItem.getShort_description()))
......@@ -252,13 +252,13 @@ public class SingleCouponsetActivity extends Activity implements View.OnClickLis
SimpleDateFormat inputFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.getDefault());
Date date = inputFormat.parse(endDate);
SimpleDateFormat outputFormat = new SimpleDateFormat("dd-MM", Locale.getDefault());
return "έως " + outputFormat.format(date);
return outputFormat.format(date);
} catch (ParseException e) {
try {
SimpleDateFormat inputFormat2 = new SimpleDateFormat("yyyy-MM-dd HH:mm", Locale.getDefault());
Date date = inputFormat2.parse(endDate);
SimpleDateFormat outputFormat = new SimpleDateFormat("dd-MM", Locale.getDefault());
return "έως " + outputFormat.format(date);
return outputFormat.format(date);
} catch (ParseException e2) {
return endDate;
}
......
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:radius="6dp" />
<solid android:color="@color/custom_skyblue4" />
<stroke
android:width="1dp"
android:color="@color/custom_skyblue5" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<corners android:radius="1000dp" />
<solid android:color="@android:color/white" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:radius="16dp" />
<corners android:radius="1000dp" />
<solid
android:width="2dp"
......
......@@ -131,7 +131,7 @@
android:layout_width="match_parent"
android:layout_height="45dp"
android:layout_marginTop="16dp"
android:background="@drawable/selector_button_light_blue"
android:background="@drawable/shape_rectangle_rounded_light_blue_tr"
android:gravity="center"
android:orientation="horizontal">
......
......@@ -23,4 +23,11 @@
<color name="custom_grey2">#D8D8D8</color>
<color name="custom_pink3">#EE437E</color>
<color name="custom_light_blue">#00A5E3</color>
<color name="custom_skyblue3">#00A3E01A</color>
<color name="custom_grey3">#5C6369</color>
<color name="custom_black6">#1D2023</color>
<color name="custom_grey4">#9BA1A6</color>
<color name="custom_black7">#002430</color>
<color name="custom_skyblue4">#DDEFFB</color>
<color name="custom_skyblue5">#CCE9FB</color>
</resources>
......
......@@ -9,19 +9,19 @@
<string name="demo_login">Σύνδεση</string>
<string name="demo_all">Όλα</string>
<string name="demo_offer">Προσφορά</string>
<string name="demo_more">Περισσότερα</string>
<string name="demo_more">View more</string>
<string name="demo_less">Λιγότερα</string>
<string name="demo_purchases">για αγορές</string>
<string name="demo_valid_until">Η προσφορά ισχύει έως %1$s</string>
<string name="demo_valid_until">Valid until %1$s</string>
<string name="demo_coupon_code">Κωδικός Κουπονιού</string>
<string name="demo_qr_code">QR Κουπονιού</string>
<string name="demo_barcode_code">Barcode Κουπονιού</string>
<string name="demo_terms">Όροι Χρήσης</string>
<string name="demo_terms">Offer terms of use</string>
<string name="demo_copy_success">Ο κωδικός αντιγράφηκε στο πρόχειρο</string>
<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>
<string name="demo_shops">Καταστήματα κοντά μου</string>
<string name="demo_website">Δες το website</string>
<string name="demo_redeem">Απόκτησε το κουπόνι</string>
<string name="demo_redeem">Get coupon</string>
<string name="demo_profile">Το προφίλ μου</string>
<string name="demo_my_coupons">Τα κουπόνια μου</string>
<string name="demo_active">Ενεργά</string>
......