Showing
8 changed files
with
195 additions
and
305 deletions
| ... | @@ -46,27 +46,15 @@ public class SingleCouponActivity extends Activity implements View.OnClickListen | ... | @@ -46,27 +46,15 @@ public class SingleCouponActivity extends Activity implements View.OnClickListen |
| 46 | private TextView mTvMoreButton; | 46 | private TextView mTvMoreButton; |
| 47 | private ImageView mIvImage; | 47 | private ImageView mIvImage; |
| 48 | 48 | ||
| 49 | - private String mFullDescriptionText; | ||
| 50 | private boolean mIsDescriptionExpanded = false; | 49 | private boolean mIsDescriptionExpanded = false; |
| 51 | 50 | ||
| 52 | // Coupon code section | 51 | // Coupon code section |
| 53 | - private LinearLayout mCouponCodeContainer; | ||
| 54 | - private LinearLayout mCouponCodeHeader; | ||
| 55 | - private LinearLayout mCouponCodeContent; | ||
| 56 | - private ImageView mIvCouponArrow; | ||
| 57 | private ImageView mIvCopyCode; | 52 | private ImageView mIvCopyCode; |
| 58 | private TextView mTvCouponCode; | 53 | private TextView mTvCouponCode; |
| 59 | - private TextView mTvCouponCodeTitle; | 54 | + private TextView mTvCouponCodeTitle, mTvMerchantName; |
| 60 | - private boolean mIsCouponCodeExpanded = false; | ||
| 61 | 55 | ||
| 62 | // QR code section | 56 | // QR code section |
| 63 | - private LinearLayout mQrCodeContainer; | ||
| 64 | - private LinearLayout mQrCodeHeader; | ||
| 65 | - private LinearLayout mQrCodeContent; | ||
| 66 | - private ImageView mIvQrArrow; | ||
| 67 | private ImageView mIvQrCode; | 57 | private ImageView mIvQrCode; |
| 68 | - private TextView mTvQrCodeTitle; | ||
| 69 | - private boolean mIsQrCodeExpanded = false; | ||
| 70 | 58 | ||
| 71 | // Terms of Use section | 59 | // Terms of Use section |
| 72 | private LinearLayout mTermsContainer; | 60 | private LinearLayout mTermsContainer; |
| ... | @@ -76,7 +64,7 @@ public class SingleCouponActivity extends Activity implements View.OnClickListen | ... | @@ -76,7 +64,7 @@ public class SingleCouponActivity extends Activity implements View.OnClickListen |
| 76 | private TextView mTvTermsText; | 64 | private TextView mTvTermsText; |
| 77 | private boolean mIsTermsExpanded = false; | 65 | private boolean mIsTermsExpanded = false; |
| 78 | 66 | ||
| 79 | - private TextView mTvHeaderTitle, mTvTermsTitle, mTvShopsTitle, mTvWebsiteTitle, mTVMoreTitle; | 67 | + private TextView mTvTermsTitle, mTvShopsTitle, mTvWebsiteTitle; |
| 80 | 68 | ||
| 81 | 69 | ||
| 82 | // =========================================================== | 70 | // =========================================================== |
| ... | @@ -122,21 +110,12 @@ public class SingleCouponActivity extends Activity implements View.OnClickListen | ... | @@ -122,21 +110,12 @@ public class SingleCouponActivity extends Activity implements View.OnClickListen |
| 122 | mTvMoreButton = findViewById(R.id.tv_more_button); | 110 | mTvMoreButton = findViewById(R.id.tv_more_button); |
| 123 | 111 | ||
| 124 | // Initialize coupon code section | 112 | // Initialize coupon code section |
| 125 | - mCouponCodeContainer = findViewById(R.id.coupon_code_container); | ||
| 126 | - mCouponCodeHeader = findViewById(R.id.coupon_code_header); | ||
| 127 | - mCouponCodeContent = findViewById(R.id.coupon_code_content); | ||
| 128 | - mIvCouponArrow = findViewById(R.id.iv_coupon_arrow); | ||
| 129 | mIvCopyCode = findViewById(R.id.iv_copy_code); | 113 | mIvCopyCode = findViewById(R.id.iv_copy_code); |
| 130 | mTvCouponCode = findViewById(R.id.tv_coupon_code); | 114 | mTvCouponCode = findViewById(R.id.tv_coupon_code); |
| 131 | mTvCouponCodeTitle = findViewById(R.id.tv_coupon_code_title); | 115 | mTvCouponCodeTitle = findViewById(R.id.tv_coupon_code_title); |
| 132 | 116 | ||
| 133 | // Initialize QR code section | 117 | // Initialize QR code section |
| 134 | - mQrCodeContainer = findViewById(R.id.qr_code_container); | ||
| 135 | - mQrCodeHeader = findViewById(R.id.qr_code_header); | ||
| 136 | - mQrCodeContent = findViewById(R.id.qr_code_content); | ||
| 137 | - mIvQrArrow = findViewById(R.id.iv_qr_arrow); | ||
| 138 | mIvQrCode = findViewById(R.id.iv_qr_code); | 118 | mIvQrCode = findViewById(R.id.iv_qr_code); |
| 139 | - mTvQrCodeTitle = findViewById(R.id.tv_qr_code_title); | ||
| 140 | 119 | ||
| 141 | // Initialize Terms of Use section | 120 | // Initialize Terms of Use section |
| 142 | mTermsContainer = findViewById(R.id.terms_container); | 121 | mTermsContainer = findViewById(R.id.terms_container); |
| ... | @@ -145,18 +124,18 @@ public class SingleCouponActivity extends Activity implements View.OnClickListen | ... | @@ -145,18 +124,18 @@ public class SingleCouponActivity extends Activity implements View.OnClickListen |
| 145 | mIvTermsArrow = findViewById(R.id.iv_terms_arrow); | 124 | mIvTermsArrow = findViewById(R.id.iv_terms_arrow); |
| 146 | mTvTermsText = findViewById(R.id.tv_terms_text); | 125 | mTvTermsText = findViewById(R.id.tv_terms_text); |
| 147 | 126 | ||
| 148 | - mTvHeaderTitle = findViewById(R.id.tv_header_title); | ||
| 149 | mTvTermsTitle = findViewById(R.id.tv_terms_title); | 127 | mTvTermsTitle = findViewById(R.id.tv_terms_title); |
| 150 | mTvShopsTitle = findViewById(R.id.tv_shops_title); | 128 | mTvShopsTitle = findViewById(R.id.tv_shops_title); |
| 151 | mTvWebsiteTitle = findViewById(R.id.tv_website_title); | 129 | mTvWebsiteTitle = findViewById(R.id.tv_website_title); |
| 152 | - mTVMoreTitle = findViewById(R.id.tv_more_title); | 130 | + mTvMerchantName = findViewById(R.id.tv_merchant_value); |
| 153 | 131 | ||
| 154 | - WarpUtils.renderCustomFont(this, R.font.ping_lcg_bold, mTvHeaderTitle, mTvValue, | 132 | + WarpUtils.renderCustomFont(this, R.font.ping_lcg_bold, mTvValue, |
| 155 | - mTvCouponCode, mTvTermsTitle, mTvShopsTitle, mTvWebsiteTitle); | 133 | + mTvCouponCode, mTvTermsTitle, mTvCouponCodeTitle, |
| 134 | + mTvMerchantName, mTvEndDate, mTvMoreButton); | ||
| 156 | 135 | ||
| 157 | WarpUtils.renderCustomFont(this, R.font.ping_lcg_regular, mTvSmallDescription, | 136 | WarpUtils.renderCustomFont(this, R.font.ping_lcg_regular, mTvSmallDescription, |
| 158 | - mTvEndDate, mTvFullDescription, mTvCouponCodeTitle, mTvQrCodeTitle, mTvTermsText, | 137 | + mTvFullDescription, mTvTermsText, |
| 159 | - mTVMoreTitle, mTvMoreButton); | 138 | + mTvShopsTitle, mTvWebsiteTitle); |
| 160 | 139 | ||
| 161 | if (mOfferItem != null) { | 140 | if (mOfferItem != null) { |
| 162 | if (mOfferItem.getExpiration() != null && !mOfferItem.getExpiration().isEmpty()) { | 141 | if (mOfferItem.getExpiration() != null && !mOfferItem.getExpiration().isEmpty()) { |
| ... | @@ -178,6 +157,8 @@ public class SingleCouponActivity extends Activity implements View.OnClickListen | ... | @@ -178,6 +157,8 @@ public class SingleCouponActivity extends Activity implements View.OnClickListen |
| 178 | .into(mIvImage); | 157 | .into(mIvImage); |
| 179 | } | 158 | } |
| 180 | 159 | ||
| 160 | + if (mOfferItem.getCouponsetDetails() != null && mOfferItem.getCouponsetDetails().getAdmin_name() != null && !TextUtils.isEmpty(mOfferItem.getCouponsetDetails().getAdmin_name())) | ||
| 161 | + mTvMerchantName.setText(mOfferItem.getCouponsetDetails().getAdmin_name()); | ||
| 181 | if (mOfferItem.getCouponsetDetails() != null && mOfferItem.getCouponsetDetails().getName() != null && !TextUtils.isEmpty(mOfferItem.getCouponsetDetails().getName())) | 162 | if (mOfferItem.getCouponsetDetails() != null && mOfferItem.getCouponsetDetails().getName() != null && !TextUtils.isEmpty(mOfferItem.getCouponsetDetails().getName())) |
| 182 | mTvValue.setText(mOfferItem.getCouponsetDetails().getName()); | 163 | mTvValue.setText(mOfferItem.getCouponsetDetails().getName()); |
| 183 | if (mOfferItem.getCouponsetDetails() != null && mOfferItem.getCouponsetDetails().getShort_description() != null && !TextUtils.isEmpty(mOfferItem.getCouponsetDetails().getShort_description())) | 164 | if (mOfferItem.getCouponsetDetails() != null && mOfferItem.getCouponsetDetails().getShort_description() != null && !TextUtils.isEmpty(mOfferItem.getCouponsetDetails().getShort_description())) |
| ... | @@ -193,9 +174,6 @@ public class SingleCouponActivity extends Activity implements View.OnClickListen | ... | @@ -193,9 +174,6 @@ public class SingleCouponActivity extends Activity implements View.OnClickListen |
| 193 | // Setup coupon code section | 174 | // Setup coupon code section |
| 194 | setupCouponCodeSection(); | 175 | setupCouponCodeSection(); |
| 195 | 176 | ||
| 196 | - // Setup QR code section | ||
| 197 | - setupQrCodeSection(); | ||
| 198 | - | ||
| 199 | // Setup Terms of Use section | 177 | // Setup Terms of Use section |
| 200 | setupTermsSection(); | 178 | setupTermsSection(); |
| 201 | } | 179 | } |
| ... | @@ -205,14 +183,14 @@ public class SingleCouponActivity extends Activity implements View.OnClickListen | ... | @@ -205,14 +183,14 @@ public class SingleCouponActivity extends Activity implements View.OnClickListen |
| 205 | try { | 183 | try { |
| 206 | SimpleDateFormat inputFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.getDefault()); | 184 | SimpleDateFormat inputFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.getDefault()); |
| 207 | Date date = inputFormat.parse(endDate); | 185 | Date date = inputFormat.parse(endDate); |
| 208 | - SimpleDateFormat outputFormat = new SimpleDateFormat("dd-MM", Locale.getDefault()); | 186 | + SimpleDateFormat outputFormat = new SimpleDateFormat("MMMM d, yyyy", Locale.ENGLISH); |
| 209 | - return "έως " + outputFormat.format(date); | 187 | + return outputFormat.format(date); |
| 210 | } catch (ParseException e) { | 188 | } catch (ParseException e) { |
| 211 | try { | 189 | try { |
| 212 | SimpleDateFormat inputFormat2 = new SimpleDateFormat("yyyy-MM-dd HH:mm", Locale.getDefault()); | 190 | SimpleDateFormat inputFormat2 = new SimpleDateFormat("yyyy-MM-dd HH:mm", Locale.getDefault()); |
| 213 | Date date = inputFormat2.parse(endDate); | 191 | Date date = inputFormat2.parse(endDate); |
| 214 | - SimpleDateFormat outputFormat = new SimpleDateFormat("dd-MM", Locale.getDefault()); | 192 | + SimpleDateFormat outputFormat = new SimpleDateFormat("MMMM d, yyyy", Locale.ENGLISH); |
| 215 | - return "έως " + outputFormat.format(date); | 193 | + return outputFormat.format(date); |
| 216 | } catch (ParseException e2) { | 194 | } catch (ParseException e2) { |
| 217 | return endDate; | 195 | return endDate; |
| 218 | } | 196 | } |
| ... | @@ -222,22 +200,6 @@ public class SingleCouponActivity extends Activity implements View.OnClickListen | ... | @@ -222,22 +200,6 @@ public class SingleCouponActivity extends Activity implements View.OnClickListen |
| 222 | private void setupCouponCodeSection() { | 200 | private void setupCouponCodeSection() { |
| 223 | mTvCouponCode.setText(mOfferItem.getCoupon()); | 201 | mTvCouponCode.setText(mOfferItem.getCoupon()); |
| 224 | 202 | ||
| 225 | - // Set click listener for the header to expand/collapse | ||
| 226 | - mCouponCodeHeader.setOnClickListener(new View.OnClickListener() { | ||
| 227 | - @Override | ||
| 228 | - public void onClick(View v) { | ||
| 229 | - toggleCouponCodeExpansion(); | ||
| 230 | - } | ||
| 231 | - }); | ||
| 232 | - | ||
| 233 | - // Set click listener for the entire container as well | ||
| 234 | - mCouponCodeContainer.setOnClickListener(new View.OnClickListener() { | ||
| 235 | - @Override | ||
| 236 | - public void onClick(View v) { | ||
| 237 | - toggleCouponCodeExpansion(); | ||
| 238 | - } | ||
| 239 | - }); | ||
| 240 | - | ||
| 241 | // Set click listener for the copy button | 203 | // Set click listener for the copy button |
| 242 | mIvCopyCode.setOnClickListener(new View.OnClickListener() { | 204 | mIvCopyCode.setOnClickListener(new View.OnClickListener() { |
| 243 | @Override | 205 | @Override |
| ... | @@ -247,20 +209,6 @@ public class SingleCouponActivity extends Activity implements View.OnClickListen | ... | @@ -247,20 +209,6 @@ public class SingleCouponActivity extends Activity implements View.OnClickListen |
| 247 | }); | 209 | }); |
| 248 | } | 210 | } |
| 249 | 211 | ||
| 250 | - private void toggleCouponCodeExpansion() { | ||
| 251 | - if (mIsCouponCodeExpanded) { | ||
| 252 | - // Collapse the content | ||
| 253 | - mCouponCodeContent.setVisibility(View.GONE); | ||
| 254 | - mIvCouponArrow.setImageResource(R.drawable.ic_arrow_down); | ||
| 255 | - mIsCouponCodeExpanded = false; | ||
| 256 | - } else { | ||
| 257 | - // Expand the content | ||
| 258 | - mCouponCodeContent.setVisibility(View.VISIBLE); | ||
| 259 | - mIvCouponArrow.setImageResource(R.drawable.ic_arrow_up); | ||
| 260 | - mIsCouponCodeExpanded = true; | ||
| 261 | - } | ||
| 262 | - } | ||
| 263 | - | ||
| 264 | private void copyCouponCodeToClipboard() { | 212 | private void copyCouponCodeToClipboard() { |
| 265 | String couponCode = mTvCouponCode.getText().toString(); | 213 | String couponCode = mTvCouponCode.getText().toString(); |
| 266 | 214 | ||
| ... | @@ -313,38 +261,6 @@ public class SingleCouponActivity extends Activity implements View.OnClickListen | ... | @@ -313,38 +261,6 @@ public class SingleCouponActivity extends Activity implements View.OnClickListen |
| 313 | } | 261 | } |
| 314 | } | 262 | } |
| 315 | 263 | ||
| 316 | - private void setupQrCodeSection() { | ||
| 317 | - // Set click listener for the header to expand/collapse | ||
| 318 | - mQrCodeHeader.setOnClickListener(new View.OnClickListener() { | ||
| 319 | - @Override | ||
| 320 | - public void onClick(View v) { | ||
| 321 | - toggleQrCodeExpansion(); | ||
| 322 | - } | ||
| 323 | - }); | ||
| 324 | - | ||
| 325 | - // Set click listener for the entire container as well | ||
| 326 | - mQrCodeContainer.setOnClickListener(new View.OnClickListener() { | ||
| 327 | - @Override | ||
| 328 | - public void onClick(View v) { | ||
| 329 | - toggleQrCodeExpansion(); | ||
| 330 | - } | ||
| 331 | - }); | ||
| 332 | - } | ||
| 333 | - | ||
| 334 | - private void toggleQrCodeExpansion() { | ||
| 335 | - if (mIsQrCodeExpanded) { | ||
| 336 | - // Collapse the content | ||
| 337 | - mQrCodeContent.setVisibility(View.GONE); | ||
| 338 | - mIvQrArrow.setImageResource(R.drawable.ic_arrow_down); | ||
| 339 | - mIsQrCodeExpanded = false; | ||
| 340 | - } else { | ||
| 341 | - // Expand the content | ||
| 342 | - mQrCodeContent.setVisibility(View.VISIBLE); | ||
| 343 | - mIvQrArrow.setImageResource(R.drawable.ic_arrow_up); | ||
| 344 | - mIsQrCodeExpanded = true; | ||
| 345 | - } | ||
| 346 | - } | ||
| 347 | - | ||
| 348 | private void setupTermsSection() { | 264 | private void setupTermsSection() { |
| 349 | // Set click listener for the header to expand/collapse | 265 | // Set click listener for the header to expand/collapse |
| 350 | mTermsHeader.setOnClickListener(new View.OnClickListener() { | 266 | mTermsHeader.setOnClickListener(new View.OnClickListener() { |
| ... | @@ -367,12 +283,12 @@ public class SingleCouponActivity extends Activity implements View.OnClickListen | ... | @@ -367,12 +283,12 @@ public class SingleCouponActivity extends Activity implements View.OnClickListen |
| 367 | if (mIsTermsExpanded) { | 283 | if (mIsTermsExpanded) { |
| 368 | // Collapse the content | 284 | // Collapse the content |
| 369 | mTermsContent.setVisibility(View.GONE); | 285 | mTermsContent.setVisibility(View.GONE); |
| 370 | - mIvTermsArrow.setImageResource(R.drawable.ic_arrow_down); | 286 | + mIvTermsArrow.animate().rotation(0f).setDuration(200).start(); |
| 371 | mIsTermsExpanded = false; | 287 | mIsTermsExpanded = false; |
| 372 | } else { | 288 | } else { |
| 373 | // Expand the content | 289 | // Expand the content |
| 374 | mTermsContent.setVisibility(View.VISIBLE); | 290 | mTermsContent.setVisibility(View.VISIBLE); |
| 375 | - mIvTermsArrow.setImageResource(R.drawable.ic_arrow_up); | 291 | + mIvTermsArrow.animate().rotation(180f).setDuration(200).start(); |
| 376 | mIsTermsExpanded = true; | 292 | mIsTermsExpanded = true; |
| 377 | } | 293 | } |
| 378 | } | 294 | } | ... | ... |
| ... | @@ -6,6 +6,7 @@ import android.os.Bundle; | ... | @@ -6,6 +6,7 @@ import android.os.Bundle; |
| 6 | import android.os.Parcelable; | 6 | import android.os.Parcelable; |
| 7 | import android.text.TextUtils; | 7 | import android.text.TextUtils; |
| 8 | import android.view.View; | 8 | import android.view.View; |
| 9 | +import android.view.ViewGroup; | ||
| 9 | import android.widget.ImageView; | 10 | import android.widget.ImageView; |
| 10 | import android.widget.LinearLayout; | 11 | import android.widget.LinearLayout; |
| 11 | import android.widget.RelativeLayout; | 12 | import android.widget.RelativeLayout; |
| ... | @@ -52,6 +53,8 @@ public class SingleCouponsetActivity extends Activity implements View.OnClickLis | ... | @@ -52,6 +53,8 @@ public class SingleCouponsetActivity extends Activity implements View.OnClickLis |
| 52 | private LinearLayout mRedeemButton, mSuccessButton; | 53 | private LinearLayout mRedeemButton, mSuccessButton; |
| 53 | private boolean mIsDescriptionExpanded = false; | 54 | private boolean mIsDescriptionExpanded = false; |
| 54 | private RelativeLayout mPbLoading; | 55 | private RelativeLayout mPbLoading; |
| 56 | + private View mSpacer; | ||
| 57 | + private LinearLayout mLlCouponInfo; | ||
| 55 | // Terms of Use section | 58 | // Terms of Use section |
| 56 | private LinearLayout mTermsContainer; | 59 | private LinearLayout mTermsContainer; |
| 57 | private LinearLayout mTermsHeader; | 60 | private LinearLayout mTermsHeader; |
| ... | @@ -137,6 +140,9 @@ public class SingleCouponsetActivity extends Activity implements View.OnClickLis | ... | @@ -137,6 +140,9 @@ public class SingleCouponsetActivity extends Activity implements View.OnClickLis |
| 137 | mTvRedeemTitle = findViewById(R.id.tv_redeem_title); | 140 | mTvRedeemTitle = findViewById(R.id.tv_redeem_title); |
| 138 | mTvSuccessRedeemTitle = findViewById(R.id.tv_success_redeem_title); | 141 | mTvSuccessRedeemTitle = findViewById(R.id.tv_success_redeem_title); |
| 139 | 142 | ||
| 143 | + mSpacer = findViewById(R.id.v_spacer); | ||
| 144 | + mLlCouponInfo = findViewById(R.id.ll_coupon_info); | ||
| 145 | + | ||
| 140 | WarpUtils.renderCustomFont(this, R.font.ping_lcg_bold, mTvValue, | 146 | WarpUtils.renderCustomFont(this, R.font.ping_lcg_bold, mTvValue, |
| 141 | mTvTermsTitle, mTvMoreButton, mTvMerchantName, | 147 | mTvTermsTitle, mTvMoreButton, mTvMerchantName, |
| 142 | mTvEndDate); | 148 | mTvEndDate); |
| ... | @@ -180,6 +186,19 @@ public class SingleCouponsetActivity extends Activity implements View.OnClickLis | ... | @@ -180,6 +186,19 @@ public class SingleCouponsetActivity extends Activity implements View.OnClickLis |
| 180 | 186 | ||
| 181 | // Setup Terms of Use section | 187 | // Setup Terms of Use section |
| 182 | setupTermsSection(); | 188 | setupTermsSection(); |
| 189 | + | ||
| 190 | + mLlCouponInfo.post(() -> { | ||
| 191 | + int usedHeight = 0; | ||
| 192 | + for (int i = 0; i < mLlCouponInfo.getChildCount(); i++) { | ||
| 193 | + View child = mLlCouponInfo.getChildAt(i); | ||
| 194 | + if (child != mSpacer) { | ||
| 195 | + usedHeight += child.getMeasuredHeight(); | ||
| 196 | + } | ||
| 197 | + } | ||
| 198 | + ViewGroup.LayoutParams params = mSpacer.getLayoutParams(); | ||
| 199 | + params.height = (int) (usedHeight * 0.5); | ||
| 200 | + mSpacer.setLayoutParams(params); | ||
| 201 | + }); | ||
| 183 | } | 202 | } |
| 184 | } | 203 | } |
| 185 | 204 | ||
| ... | @@ -241,12 +260,12 @@ public class SingleCouponsetActivity extends Activity implements View.OnClickLis | ... | @@ -241,12 +260,12 @@ public class SingleCouponsetActivity extends Activity implements View.OnClickLis |
| 241 | if (mIsTermsExpanded) { | 260 | if (mIsTermsExpanded) { |
| 242 | // Collapse the content | 261 | // Collapse the content |
| 243 | mTermsContent.setVisibility(View.GONE); | 262 | mTermsContent.setVisibility(View.GONE); |
| 244 | - mIvTermsArrow.setImageResource(R.drawable.ic_arrow_down); | 263 | + mIvTermsArrow.animate().rotation(0f).setDuration(200).start(); |
| 245 | mIsTermsExpanded = false; | 264 | mIsTermsExpanded = false; |
| 246 | } else { | 265 | } else { |
| 247 | // Expand the content | 266 | // Expand the content |
| 248 | mTermsContent.setVisibility(View.VISIBLE); | 267 | mTermsContent.setVisibility(View.VISIBLE); |
| 249 | - mIvTermsArrow.setImageResource(R.drawable.ic_arrow_up); | 268 | + mIvTermsArrow.animate().rotation(180f).setDuration(200).start(); |
| 250 | mIsTermsExpanded = true; | 269 | mIsTermsExpanded = true; |
| 251 | } | 270 | } |
| 252 | } | 271 | } |
| ... | @@ -255,13 +274,13 @@ public class SingleCouponsetActivity extends Activity implements View.OnClickLis | ... | @@ -255,13 +274,13 @@ public class SingleCouponsetActivity extends Activity implements View.OnClickLis |
| 255 | try { | 274 | try { |
| 256 | SimpleDateFormat inputFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.getDefault()); | 275 | SimpleDateFormat inputFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.getDefault()); |
| 257 | Date date = inputFormat.parse(endDate); | 276 | Date date = inputFormat.parse(endDate); |
| 258 | - SimpleDateFormat outputFormat = new SimpleDateFormat("dd-MM", Locale.getDefault()); | 277 | + SimpleDateFormat outputFormat = new SimpleDateFormat("MMMM d, yyyy", Locale.ENGLISH); |
| 259 | return outputFormat.format(date); | 278 | return outputFormat.format(date); |
| 260 | } catch (ParseException e) { | 279 | } catch (ParseException e) { |
| 261 | try { | 280 | try { |
| 262 | SimpleDateFormat inputFormat2 = new SimpleDateFormat("yyyy-MM-dd HH:mm", Locale.getDefault()); | 281 | SimpleDateFormat inputFormat2 = new SimpleDateFormat("yyyy-MM-dd HH:mm", Locale.getDefault()); |
| 263 | Date date = inputFormat2.parse(endDate); | 282 | Date date = inputFormat2.parse(endDate); |
| 264 | - SimpleDateFormat outputFormat = new SimpleDateFormat("dd-MM", Locale.getDefault()); | 283 | + SimpleDateFormat outputFormat = new SimpleDateFormat("MMMM d, yyyy", Locale.ENGLISH); |
| 265 | return outputFormat.format(date); | 284 | return outputFormat.format(date); |
| 266 | } catch (ParseException e2) { | 285 | } catch (ParseException e2) { |
| 267 | return endDate; | 286 | return endDate; | ... | ... |
| 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="1000dp" /> | ||
| 5 | + | ||
| 6 | + <solid | ||
| 7 | + android:width="2dp" | ||
| 8 | + android:color="@color/custom_skyblue4" /> | ||
| 9 | +</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="rectangle"> | ||
| 4 | + <corners android:radius="12dp" /> | ||
| 5 | + | ||
| 6 | + <solid | ||
| 7 | + android:width="2dp" | ||
| 8 | + android:color="@color/custom_skyblue4" /> | ||
| 9 | +</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="rectangle"> | ||
| 4 | + <corners android:radius="10dp" /> | ||
| 5 | + | ||
| 6 | + <solid android:color="@android:color/white" /> | ||
| 7 | +</shape> | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| ... | @@ -17,43 +17,16 @@ | ... | @@ -17,43 +17,16 @@ |
| 17 | android:layout_height="wrap_content" | 17 | android:layout_height="wrap_content" |
| 18 | android:orientation="vertical"> | 18 | android:orientation="vertical"> |
| 19 | 19 | ||
| 20 | - <LinearLayout | 20 | + <androidx.constraintlayout.widget.ConstraintLayout |
| 21 | - android:id="@+id/header_layout" | ||
| 22 | android:layout_width="match_parent" | 21 | android:layout_width="match_parent" |
| 23 | - android:layout_height="wrap_content" | 22 | + android:layout_height="260dp" |
| 24 | - android:layout_gravity="center" | 23 | + android:background="@color/custom_skyblue3"> |
| 25 | - android:background="@color/white" | ||
| 26 | - android:orientation="horizontal" | ||
| 27 | - android:padding="16dp"> | ||
| 28 | - | ||
| 29 | - <LinearLayout | ||
| 30 | - android:layout_width="0dp" | ||
| 31 | - android:layout_height="wrap_content" | ||
| 32 | - android:gravity="center_vertical" | ||
| 33 | - android:layout_weight="1" | ||
| 34 | - android:orientation="horizontal"> | ||
| 35 | - | ||
| 36 | - <ImageView | ||
| 37 | - android:id="@+id/iv_back" | ||
| 38 | - android:layout_width="16dp" | ||
| 39 | - android:layout_height="16dp" | ||
| 40 | - android:layout_marginEnd="24dp" | ||
| 41 | - android:src="@drawable/ic_back" /> | ||
| 42 | 24 | ||
| 43 | <TextView | 25 | <TextView |
| 44 | - android:id="@+id/tv_header_title" | 26 | + android:id="@+id/textView" |
| 45 | android:layout_width="wrap_content" | 27 | android:layout_width="wrap_content" |
| 46 | android:layout_height="wrap_content" | 28 | android:layout_height="wrap_content" |
| 47 | - android:includeFontPadding="false" | 29 | + android:text="coupon_code_content" /> |
| 48 | - android:text="@string/demo_offer" | ||
| 49 | - android:textColor="@color/custom_black4" | ||
| 50 | - android:textSize="16sp" /> | ||
| 51 | - </LinearLayout> | ||
| 52 | - </LinearLayout> | ||
| 53 | - | ||
| 54 | - <androidx.constraintlayout.widget.ConstraintLayout | ||
| 55 | - android:layout_width="match_parent" | ||
| 56 | - android:layout_height="210dp"> | ||
| 57 | 30 | ||
| 58 | <ImageView | 31 | <ImageView |
| 59 | android:id="@+id/iv_coupon_image" | 32 | android:id="@+id/iv_coupon_image" |
| ... | @@ -66,67 +39,66 @@ | ... | @@ -66,67 +39,66 @@ |
| 66 | app:layout_constraintTop_toTopOf="parent" /> | 39 | app:layout_constraintTop_toTopOf="parent" /> |
| 67 | 40 | ||
| 68 | <LinearLayout | 41 | <LinearLayout |
| 42 | + android:id="@+id/header_layout" | ||
| 69 | android:layout_width="wrap_content" | 43 | android:layout_width="wrap_content" |
| 70 | android:layout_height="wrap_content" | 44 | android:layout_height="wrap_content" |
| 71 | - android:layout_marginTop="8dp" | 45 | + android:layout_marginStart="16dp" |
| 72 | - android:layout_marginEnd="8dp" | 46 | + android:layout_marginTop="16dp" |
| 73 | - android:background="@drawable/demo_shape_white_border_grey" | 47 | + app:layout_constraintStart_toStartOf="parent" |
| 74 | - android:orientation="horizontal" | ||
| 75 | - android:paddingHorizontal="8dp" | ||
| 76 | - android:paddingVertical="3dp" | ||
| 77 | - app:layout_constraintEnd_toEndOf="parent" | ||
| 78 | app:layout_constraintTop_toTopOf="parent"> | 48 | app:layout_constraintTop_toTopOf="parent"> |
| 79 | 49 | ||
| 80 | <ImageView | 50 | <ImageView |
| 81 | - android:layout_width="12dp" | 51 | + android:id="@+id/iv_back" |
| 82 | - android:layout_height="12dp" | 52 | + android:layout_width="38dp" |
| 83 | - android:layout_marginEnd="4dp" | 53 | + android:layout_height="38dp" |
| 84 | - android:src="@drawable/ic_info" /> | 54 | + android:background="@drawable/demo_shape_white" |
| 85 | - | 55 | + android:padding="13dp" |
| 86 | - <TextView | 56 | + android:src="@drawable/ic_back" /> |
| 87 | - android:id="@+id/tv_more_title" | ||
| 88 | - android:layout_width="wrap_content" | ||
| 89 | - android:layout_height="wrap_content" | ||
| 90 | - android:includeFontPadding="false" | ||
| 91 | - android:text="@string/demo_more" | ||
| 92 | - android:textColor="@color/custom_black4" | ||
| 93 | - android:textSize="11sp" /> | ||
| 94 | </LinearLayout> | 57 | </LinearLayout> |
| 95 | </androidx.constraintlayout.widget.ConstraintLayout> | 58 | </androidx.constraintlayout.widget.ConstraintLayout> |
| 96 | 59 | ||
| 97 | <LinearLayout | 60 | <LinearLayout |
| 98 | android:id="@+id/ll_coupon_info" | 61 | android:id="@+id/ll_coupon_info" |
| 99 | android:layout_width="match_parent" | 62 | android:layout_width="match_parent" |
| 100 | - android:layout_height="wrap_content" | 63 | + android:layout_height="0dp" |
| 64 | + android:layout_marginBottom="48dp" | ||
| 65 | + android:layout_weight="1" | ||
| 101 | android:orientation="vertical" | 66 | android:orientation="vertical" |
| 102 | android:paddingHorizontal="16dp" | 67 | android:paddingHorizontal="16dp" |
| 103 | - android:paddingVertical="16dp" | 68 | + android:paddingVertical="16dp"> |
| 104 | - android:layout_marginBottom="48dp"> | ||
| 105 | 69 | ||
| 106 | <androidx.constraintlayout.widget.ConstraintLayout | 70 | <androidx.constraintlayout.widget.ConstraintLayout |
| 107 | android:layout_width="match_parent" | 71 | android:layout_width="match_parent" |
| 108 | - android:layout_height="wrap_content" | 72 | + android:layout_height="wrap_content"> |
| 109 | - android:gravity="center_vertical" | ||
| 110 | - android:orientation="horizontal"> | ||
| 111 | 73 | ||
| 112 | <LinearLayout | 74 | <LinearLayout |
| 113 | android:id="@+id/ll_info" | 75 | android:id="@+id/ll_info" |
| 114 | android:layout_width="0dp" | 76 | android:layout_width="0dp" |
| 115 | android:layout_height="wrap_content" | 77 | android:layout_height="wrap_content" |
| 116 | android:orientation="vertical" | 78 | android:orientation="vertical" |
| 117 | - android:paddingEnd="16dp" | ||
| 118 | app:layout_constraintBottom_toBottomOf="parent" | 79 | app:layout_constraintBottom_toBottomOf="parent" |
| 119 | - app:layout_constraintEnd_toStartOf="@+id/ll_buttons" | 80 | + app:layout_constraintEnd_toEndOf="parent" |
| 120 | app:layout_constraintStart_toStartOf="parent" | 81 | app:layout_constraintStart_toStartOf="parent" |
| 121 | app:layout_constraintTop_toTopOf="parent"> | 82 | app:layout_constraintTop_toTopOf="parent"> |
| 122 | 83 | ||
| 123 | <TextView | 84 | <TextView |
| 85 | + android:id="@+id/tv_merchant_value" | ||
| 86 | + android:layout_width="wrap_content" | ||
| 87 | + android:layout_height="wrap_content" | ||
| 88 | + android:includeFontPadding="false" | ||
| 89 | + android:maxLines="1" | ||
| 90 | + android:textColor="@color/custom_grey4" | ||
| 91 | + android:textSize="16sp" | ||
| 92 | + tools:text="@string/demo_more" /> | ||
| 93 | + | ||
| 94 | + <TextView | ||
| 124 | android:id="@+id/tv_coupon_value" | 95 | android:id="@+id/tv_coupon_value" |
| 125 | android:layout_width="wrap_content" | 96 | android:layout_width="wrap_content" |
| 126 | android:layout_height="wrap_content" | 97 | android:layout_height="wrap_content" |
| 98 | + android:layout_marginTop="16dp" | ||
| 127 | android:includeFontPadding="false" | 99 | android:includeFontPadding="false" |
| 128 | android:maxLines="1" | 100 | android:maxLines="1" |
| 129 | - android:textColor="@color/custom_pink2" | 101 | + android:textColor="@color/custom_black2" |
| 130 | android:textSize="23sp" | 102 | android:textSize="23sp" |
| 131 | tools:text="@string/demo_more" /> | 103 | tools:text="@string/demo_more" /> |
| 132 | 104 | ||
| ... | @@ -134,57 +106,56 @@ | ... | @@ -134,57 +106,56 @@ |
| 134 | android:id="@+id/tv_coupon_small_description" | 106 | android:id="@+id/tv_coupon_small_description" |
| 135 | android:layout_width="wrap_content" | 107 | android:layout_width="wrap_content" |
| 136 | android:layout_height="wrap_content" | 108 | android:layout_height="wrap_content" |
| 137 | - android:layout_marginTop="2dp" | 109 | + android:layout_marginTop="8dp" |
| 138 | android:ellipsize="end" | 110 | android:ellipsize="end" |
| 139 | android:includeFontPadding="false" | 111 | android:includeFontPadding="false" |
| 140 | android:maxLines="1" | 112 | android:maxLines="1" |
| 141 | android:text="@string/demo_purchases" | 113 | android:text="@string/demo_purchases" |
| 142 | - android:textColor="@color/custom_black5" | 114 | + android:textColor="@color/custom_black2" |
| 143 | android:textSize="17sp" /> | 115 | android:textSize="17sp" /> |
| 144 | </LinearLayout> | 116 | </LinearLayout> |
| 117 | + </androidx.constraintlayout.widget.ConstraintLayout> | ||
| 145 | 118 | ||
| 146 | <LinearLayout | 119 | <LinearLayout |
| 147 | - android:id="@+id/ll_buttons" | 120 | + android:id="@+id/ll_date" |
| 148 | android:layout_width="wrap_content" | 121 | android:layout_width="wrap_content" |
| 149 | android:layout_height="wrap_content" | 122 | android:layout_height="wrap_content" |
| 123 | + android:layout_marginTop="22dp" | ||
| 124 | + android:background="@drawable/demo_shape_skyblue_border_blue" | ||
| 125 | + android:gravity="center" | ||
| 150 | android:orientation="horizontal" | 126 | android:orientation="horizontal" |
| 151 | - app:layout_constraintBottom_toBottomOf="parent" | 127 | + android:paddingHorizontal="8dp" |
| 152 | - app:layout_constraintEnd_toEndOf="parent" | 128 | + android:paddingVertical="6dp"> |
| 153 | - app:layout_constraintTop_toTopOf="parent"> | ||
| 154 | 129 | ||
| 155 | <ImageView | 130 | <ImageView |
| 156 | - android:layout_width="40dp" | 131 | + android:layout_width="14dp" |
| 157 | - android:layout_height="40dp" | 132 | + android:layout_height="14dp" |
| 158 | - android:layout_marginEnd="8dp" | 133 | + android:src="@drawable/demo_time" /> |
| 159 | - android:src="@drawable/demo_heart_border" /> | ||
| 160 | 134 | ||
| 161 | - <ImageView | 135 | + <View |
| 162 | - android:layout_width="40dp" | 136 | + android:layout_width="4dp" |
| 163 | - android:layout_height="40dp" | 137 | + android:layout_height="match_parent" /> |
| 164 | - android:src="@drawable/demo_folder" /> | ||
| 165 | - </LinearLayout> | ||
| 166 | - </androidx.constraintlayout.widget.ConstraintLayout> | ||
| 167 | 138 | ||
| 168 | <TextView | 139 | <TextView |
| 169 | android:id="@+id/tv_coupon_end_date" | 140 | android:id="@+id/tv_coupon_end_date" |
| 170 | android:layout_width="wrap_content" | 141 | android:layout_width="wrap_content" |
| 171 | android:layout_height="wrap_content" | 142 | android:layout_height="wrap_content" |
| 172 | - android:layout_marginTop="14dp" | ||
| 173 | android:includeFontPadding="false" | 143 | android:includeFontPadding="false" |
| 174 | - android:textColor="@color/custom_black5" | 144 | + android:textColor="@color/custom_black7" |
| 175 | - android:textSize="13sp" | 145 | + android:textSize="12sp" |
| 176 | tools:text="@string/demo_purchases" /> | 146 | tools:text="@string/demo_purchases" /> |
| 147 | + </LinearLayout> | ||
| 177 | 148 | ||
| 178 | <TextView | 149 | <TextView |
| 179 | android:id="@+id/tv_coupon_full_description" | 150 | android:id="@+id/tv_coupon_full_description" |
| 180 | android:layout_width="match_parent" | 151 | android:layout_width="match_parent" |
| 181 | android:layout_height="wrap_content" | 152 | android:layout_height="wrap_content" |
| 182 | - android:layout_marginTop="16dp" | 153 | + android:layout_marginTop="24dp" |
| 183 | android:ellipsize="end" | 154 | android:ellipsize="end" |
| 184 | android:lineSpacingExtra="2dp" | 155 | android:lineSpacingExtra="2dp" |
| 185 | android:maxLines="4" | 156 | android:maxLines="4" |
| 186 | - android:textColor="@color/custom_black5" | 157 | + android:textColor="@color/custom_grey3" |
| 187 | - android:textSize="17sp" | 158 | + android:textSize="15sp" |
| 188 | tools:text="Πάρτε τα πακέτα κινητής στη μισή τιμή μόνο αυτό το μήνα. Απεριόριστα λεπτά προς όλα τα δίκτυα, SMS και 50GB δεδομένα υψηλής ταχύτητας. Ισχύει για νέους συνδρομητές και ανανεώσεις συμβολαίων. Δωρεάν ενεργοποίηση και τεχνική υποστήριξη." /> | 159 | tools:text="Πάρτε τα πακέτα κινητής στη μισή τιμή μόνο αυτό το μήνα. Απεριόριστα λεπτά προς όλα τα δίκτυα, SMS και 50GB δεδομένα υψηλής ταχύτητας. Ισχύει για νέους συνδρομητές και ανανεώσεις συμβολαίων. Δωρεάν ενεργοποίηση και τεχνική υποστήριξη." /> |
| 189 | 160 | ||
| 190 | <TextView | 161 | <TextView |
| ... | @@ -194,61 +165,65 @@ | ... | @@ -194,61 +165,65 @@ |
| 194 | android:layout_gravity="end" | 165 | android:layout_gravity="end" |
| 195 | android:layout_marginTop="2dp" | 166 | android:layout_marginTop="2dp" |
| 196 | android:text="@string/demo_more" | 167 | android:text="@string/demo_more" |
| 197 | - android:textColor="@color/custom_skyblue" | 168 | + android:textColor="@color/custom_black6" |
| 198 | android:textSize="15sp" | 169 | android:textSize="15sp" |
| 199 | android:visibility="gone" /> | 170 | android:visibility="gone" /> |
| 200 | 171 | ||
| 201 | - <LinearLayout | 172 | + <androidx.constraintlayout.widget.ConstraintLayout |
| 202 | - android:id="@+id/coupon_code_container" | ||
| 203 | android:layout_width="match_parent" | 173 | android:layout_width="match_parent" |
| 204 | android:layout_height="wrap_content" | 174 | android:layout_height="wrap_content" |
| 205 | android:layout_marginTop="32dp" | 175 | android:layout_marginTop="32dp" |
| 206 | - android:background="@drawable/shape_rectangle_rounded_white" | 176 | + android:background="@drawable/shape_rectangle_rounded_skyblue2" |
| 207 | - android:orientation="vertical" | 177 | + android:paddingHorizontal="4dp" |
| 208 | - android:padding="16dp"> | 178 | + android:paddingTop="8dp" |
| 209 | - | 179 | + android:paddingBottom="4dp"> |
| 210 | - <LinearLayout | ||
| 211 | - android:id="@+id/coupon_code_header" | ||
| 212 | - android:layout_width="match_parent" | ||
| 213 | - android:layout_height="wrap_content" | ||
| 214 | - android:gravity="center_vertical" | ||
| 215 | - android:orientation="horizontal"> | ||
| 216 | 180 | ||
| 217 | <TextView | 181 | <TextView |
| 218 | android:id="@+id/tv_coupon_code_title" | 182 | android:id="@+id/tv_coupon_code_title" |
| 219 | android:layout_width="0dp" | 183 | android:layout_width="0dp" |
| 220 | android:layout_height="wrap_content" | 184 | android:layout_height="wrap_content" |
| 221 | - android:layout_weight="1" | 185 | + android:paddingHorizontal="16dp" |
| 222 | android:text="@string/demo_coupon_code" | 186 | android:text="@string/demo_coupon_code" |
| 223 | android:textColor="@color/custom_black2" | 187 | android:textColor="@color/custom_black2" |
| 224 | - android:textSize="15sp" /> | 188 | + android:textSize="14sp" |
| 189 | + app:layout_constraintStart_toStartOf="parent" | ||
| 190 | + app:layout_constraintTop_toTopOf="parent" /> | ||
| 191 | + | ||
| 192 | + <LinearLayout | ||
| 193 | + android:layout_width="0dp" | ||
| 194 | + android:layout_height="wrap_content" | ||
| 195 | + android:layout_marginTop="8dp" | ||
| 196 | + android:background="@drawable/shape_rectangle_rounded_white2" | ||
| 197 | + android:gravity="center_horizontal" | ||
| 198 | + android:orientation="vertical" | ||
| 199 | + android:paddingVertical="8dp" | ||
| 200 | + app:layout_constraintBottom_toBottomOf="parent" | ||
| 201 | + app:layout_constraintEnd_toEndOf="parent" | ||
| 202 | + app:layout_constraintStart_toStartOf="parent" | ||
| 203 | + app:layout_constraintTop_toBottomOf="@+id/tv_coupon_code_title"> | ||
| 225 | 204 | ||
| 226 | <ImageView | 205 | <ImageView |
| 227 | - android:id="@+id/iv_coupon_arrow" | 206 | + android:id="@+id/iv_qr_code" |
| 228 | - android:layout_width="12dp" | 207 | + android:layout_width="200dp" |
| 229 | - android:layout_height="12dp" | 208 | + android:layout_height="110dp" |
| 230 | - android:src="@drawable/ic_arrow_down" /> | 209 | + android:scaleType="fitCenter" |
| 231 | - </LinearLayout> | 210 | + android:src="@drawable/demo_barcode" /> |
| 232 | 211 | ||
| 233 | <LinearLayout | 212 | <LinearLayout |
| 234 | android:id="@+id/coupon_code_content" | 213 | android:id="@+id/coupon_code_content" |
| 235 | - android:layout_width="match_parent" | 214 | + android:layout_width="wrap_content" |
| 236 | android:layout_height="wrap_content" | 215 | android:layout_height="wrap_content" |
| 237 | - android:layout_marginTop="24dp" | ||
| 238 | - android:layout_marginBottom="16dp" | ||
| 239 | android:gravity="center_vertical" | 216 | android:gravity="center_vertical" |
| 240 | - android:orientation="horizontal" | 217 | + android:orientation="horizontal"> |
| 241 | - android:visibility="gone"> | ||
| 242 | 218 | ||
| 243 | <TextView | 219 | <TextView |
| 244 | android:id="@+id/tv_coupon_code" | 220 | android:id="@+id/tv_coupon_code" |
| 245 | android:layout_width="wrap_content" | 221 | android:layout_width="wrap_content" |
| 246 | android:layout_height="wrap_content" | 222 | android:layout_height="wrap_content" |
| 247 | - android:layout_marginEnd="12dp" | ||
| 248 | android:includeFontPadding="false" | 223 | android:includeFontPadding="false" |
| 249 | - android:text="test_coupon_code" | ||
| 250 | android:textColor="@color/custom_black2" | 224 | android:textColor="@color/custom_black2" |
| 251 | - android:textSize="23sp" /> | 225 | + android:textSize="17sp" |
| 226 | + tools:text="BDTK0Y8UD8" /> | ||
| 252 | 227 | ||
| 253 | <ImageView | 228 | <ImageView |
| 254 | android:id="@+id/iv_copy_code" | 229 | android:id="@+id/iv_copy_code" |
| ... | @@ -257,70 +232,57 @@ | ... | @@ -257,70 +232,57 @@ |
| 257 | android:src="@drawable/demo_copy" /> | 232 | android:src="@drawable/demo_copy" /> |
| 258 | </LinearLayout> | 233 | </LinearLayout> |
| 259 | </LinearLayout> | 234 | </LinearLayout> |
| 235 | + </androidx.constraintlayout.widget.ConstraintLayout> | ||
| 260 | 236 | ||
| 261 | <LinearLayout | 237 | <LinearLayout |
| 262 | - android:id="@+id/qr_code_container" | ||
| 263 | - android:layout_width="match_parent" | ||
| 264 | - android:layout_height="wrap_content" | ||
| 265 | - android:layout_marginTop="16dp" | ||
| 266 | - android:background="@drawable/shape_rectangle_rounded_white" | ||
| 267 | - android:orientation="vertical" | ||
| 268 | - android:padding="16dp"> | ||
| 269 | - | ||
| 270 | - <LinearLayout | ||
| 271 | - android:id="@+id/qr_code_header" | ||
| 272 | android:layout_width="match_parent" | 238 | android:layout_width="match_parent" |
| 273 | - android:layout_height="wrap_content" | 239 | + android:layout_height="55dp" |
| 274 | - android:gravity="center_vertical" | 240 | + android:layout_marginTop="32dp" |
| 241 | + android:background="@drawable/shape_rectangle_rounded_light_blue_tr" | ||
| 242 | + android:gravity="center" | ||
| 275 | android:orientation="horizontal"> | 243 | android:orientation="horizontal"> |
| 276 | 244 | ||
| 277 | <TextView | 245 | <TextView |
| 278 | - android:id="@+id/tv_qr_code_title" | 246 | + android:id="@+id/tv_shops_title" |
| 279 | - android:layout_width="0dp" | 247 | + android:layout_width="wrap_content" |
| 280 | android:layout_height="wrap_content" | 248 | android:layout_height="wrap_content" |
| 281 | - android:layout_weight="1" | 249 | + android:includeFontPadding="false" |
| 282 | - android:text="@string/demo_barcode_code" | 250 | + android:text="@string/demo_shops" |
| 283 | - android:textColor="@color/custom_black2" | 251 | + android:textColor="@color/white" |
| 284 | - android:textSize="15sp" /> | 252 | + android:textSize="16sp" /> |
| 285 | - | ||
| 286 | - <ImageView | ||
| 287 | - android:id="@+id/iv_qr_arrow" | ||
| 288 | - android:layout_width="12dp" | ||
| 289 | - android:layout_height="12dp" | ||
| 290 | - android:src="@drawable/ic_arrow_down" /> | ||
| 291 | </LinearLayout> | 253 | </LinearLayout> |
| 292 | 254 | ||
| 293 | <LinearLayout | 255 | <LinearLayout |
| 294 | - android:id="@+id/qr_code_content" | ||
| 295 | android:layout_width="match_parent" | 256 | android:layout_width="match_parent" |
| 296 | - android:layout_height="wrap_content" | 257 | + android:layout_height="55dp" |
| 297 | android:layout_marginTop="16dp" | 258 | android:layout_marginTop="16dp" |
| 259 | + android:background="@drawable/shape_rectangle_rounded_skyblue" | ||
| 298 | android:gravity="center" | 260 | android:gravity="center" |
| 299 | - android:orientation="vertical" | 261 | + android:orientation="horizontal"> |
| 300 | - android:visibility="gone"> | ||
| 301 | 262 | ||
| 302 | - <ImageView | 263 | + <TextView |
| 303 | - android:id="@+id/iv_qr_code" | 264 | + android:id="@+id/tv_website_title" |
| 304 | - android:layout_width="200dp" | 265 | + android:layout_width="wrap_content" |
| 305 | - android:layout_height="120dp" | 266 | + android:layout_height="wrap_content" |
| 306 | - android:layout_marginVertical="16dp" | 267 | + android:includeFontPadding="false" |
| 307 | - android:scaleType="fitCenter" | 268 | + android:text="@string/demo_website" |
| 308 | - android:src="@drawable/demo_barcode" /> | 269 | + android:textColor="@color/custom_black7" |
| 309 | - </LinearLayout> | 270 | + android:textSize="16sp" /> |
| 310 | </LinearLayout> | 271 | </LinearLayout> |
| 311 | 272 | ||
| 312 | <LinearLayout | 273 | <LinearLayout |
| 313 | android:id="@+id/terms_container" | 274 | android:id="@+id/terms_container" |
| 314 | android:layout_width="match_parent" | 275 | android:layout_width="match_parent" |
| 315 | android:layout_height="wrap_content" | 276 | android:layout_height="wrap_content" |
| 316 | - android:layout_marginTop="48dp" | 277 | + android:layout_marginTop="28dp" |
| 317 | android:orientation="vertical" | 278 | android:orientation="vertical" |
| 318 | android:paddingHorizontal="2dp"> | 279 | android:paddingHorizontal="2dp"> |
| 319 | 280 | ||
| 320 | <LinearLayout | 281 | <LinearLayout |
| 321 | android:id="@+id/terms_header" | 282 | android:id="@+id/terms_header" |
| 322 | - android:layout_width="match_parent" | 283 | + android:layout_width="wrap_content" |
| 323 | android:layout_height="wrap_content" | 284 | android:layout_height="wrap_content" |
| 285 | + android:layout_gravity="center" | ||
| 324 | android:gravity="center_vertical" | 286 | android:gravity="center_vertical" |
| 325 | android:orientation="horizontal"> | 287 | android:orientation="horizontal"> |
| 326 | 288 | ||
| ... | @@ -329,13 +291,13 @@ | ... | @@ -329,13 +291,13 @@ |
| 329 | android:layout_width="wrap_content" | 291 | android:layout_width="wrap_content" |
| 330 | android:layout_height="wrap_content" | 292 | android:layout_height="wrap_content" |
| 331 | android:text="@string/demo_terms" | 293 | android:text="@string/demo_terms" |
| 332 | - android:textColor="@color/custom_black2" | 294 | + android:textColor="@color/custom_grey3" |
| 333 | - android:textSize="15sp"/> | 295 | + android:textSize="15sp" /> |
| 334 | 296 | ||
| 335 | <ImageView | 297 | <ImageView |
| 336 | android:id="@+id/iv_terms_arrow" | 298 | android:id="@+id/iv_terms_arrow" |
| 337 | - android:layout_width="8dp" | 299 | + android:layout_width="10dp" |
| 338 | - android:layout_height="8dp" | 300 | + android:layout_height="10dp" |
| 339 | android:layout_marginStart="4dp" | 301 | android:layout_marginStart="4dp" |
| 340 | android:layout_marginTop="2dp" | 302 | android:layout_marginTop="2dp" |
| 341 | android:src="@drawable/ic_arrow_down" /> | 303 | android:src="@drawable/ic_arrow_down" /> |
| ... | @@ -360,42 +322,6 @@ | ... | @@ -360,42 +322,6 @@ |
| 360 | android:textSize="15sp" /> | 322 | android:textSize="15sp" /> |
| 361 | </LinearLayout> | 323 | </LinearLayout> |
| 362 | </LinearLayout> | 324 | </LinearLayout> |
| 363 | - | ||
| 364 | - <LinearLayout | ||
| 365 | - android:layout_width="match_parent" | ||
| 366 | - android:layout_height="55dp" | ||
| 367 | - android:layout_marginTop="48dp" | ||
| 368 | - android:background="@drawable/selector_button_black" | ||
| 369 | - android:gravity="center" | ||
| 370 | - android:orientation="horizontal"> | ||
| 371 | - | ||
| 372 | - <TextView | ||
| 373 | - android:id="@+id/tv_shops_title" | ||
| 374 | - android:layout_width="wrap_content" | ||
| 375 | - android:layout_height="wrap_content" | ||
| 376 | - android:text="@string/demo_shops" | ||
| 377 | - android:textColor="@color/white" | ||
| 378 | - android:textSize="15sp" | ||
| 379 | - android:textStyle="bold" /> | ||
| 380 | - </LinearLayout> | ||
| 381 | - | ||
| 382 | - <LinearLayout | ||
| 383 | - android:layout_width="match_parent" | ||
| 384 | - android:layout_height="55dp" | ||
| 385 | - android:layout_marginTop="20dp" | ||
| 386 | - android:background="@drawable/selector_button_transparent_black_border" | ||
| 387 | - android:gravity="center" | ||
| 388 | - android:orientation="horizontal"> | ||
| 389 | - | ||
| 390 | - <TextView | ||
| 391 | - android:id="@+id/tv_website_title" | ||
| 392 | - android:layout_width="wrap_content" | ||
| 393 | - android:layout_height="wrap_content" | ||
| 394 | - android:text="@string/demo_website" | ||
| 395 | - android:textColor="@color/custom_black2" | ||
| 396 | - android:textSize="15sp" | ||
| 397 | - android:textStyle="bold" /> | ||
| 398 | - </LinearLayout> | ||
| 399 | </LinearLayout> | 325 | </LinearLayout> |
| 400 | </LinearLayout> | 326 | </LinearLayout> |
| 401 | </ScrollView> | 327 | </ScrollView> | ... | ... |
| ... | @@ -14,7 +14,7 @@ | ... | @@ -14,7 +14,7 @@ |
| 14 | <LinearLayout | 14 | <LinearLayout |
| 15 | android:id="@+id/home_content_container" | 15 | android:id="@+id/home_content_container" |
| 16 | android:layout_width="match_parent" | 16 | android:layout_width="match_parent" |
| 17 | - android:layout_height="wrap_content" | 17 | + android:layout_height="match_parent" |
| 18 | android:orientation="vertical"> | 18 | android:orientation="vertical"> |
| 19 | 19 | ||
| 20 | <androidx.constraintlayout.widget.ConstraintLayout | 20 | <androidx.constraintlayout.widget.ConstraintLayout |
| ... | @@ -54,24 +54,23 @@ | ... | @@ -54,24 +54,23 @@ |
| 54 | <LinearLayout | 54 | <LinearLayout |
| 55 | android:id="@+id/ll_coupon_info" | 55 | android:id="@+id/ll_coupon_info" |
| 56 | android:layout_width="match_parent" | 56 | android:layout_width="match_parent" |
| 57 | - android:layout_height="wrap_content" | 57 | + android:layout_height="0dp" |
| 58 | + android:layout_weight="1" | ||
| 58 | android:layout_marginBottom="48dp" | 59 | android:layout_marginBottom="48dp" |
| 59 | android:orientation="vertical" | 60 | android:orientation="vertical" |
| 60 | android:paddingHorizontal="16dp" | 61 | android:paddingHorizontal="16dp" |
| 61 | android:paddingVertical="16dp"> | 62 | android:paddingVertical="16dp"> |
| 62 | 63 | ||
| 63 | <androidx.constraintlayout.widget.ConstraintLayout | 64 | <androidx.constraintlayout.widget.ConstraintLayout |
| 65 | + android:id="@+id/cl_info" | ||
| 64 | android:layout_width="match_parent" | 66 | android:layout_width="match_parent" |
| 65 | - android:layout_height="wrap_content" | 67 | + android:layout_height="wrap_content"> |
| 66 | - android:gravity="center_vertical" | ||
| 67 | - android:orientation="horizontal"> | ||
| 68 | 68 | ||
| 69 | <LinearLayout | 69 | <LinearLayout |
| 70 | android:id="@+id/ll_info" | 70 | android:id="@+id/ll_info" |
| 71 | android:layout_width="0dp" | 71 | android:layout_width="0dp" |
| 72 | android:layout_height="wrap_content" | 72 | android:layout_height="wrap_content" |
| 73 | android:orientation="vertical" | 73 | android:orientation="vertical" |
| 74 | - android:paddingEnd="16dp" | ||
| 75 | app:layout_constraintBottom_toBottomOf="parent" | 74 | app:layout_constraintBottom_toBottomOf="parent" |
| 76 | app:layout_constraintEnd_toEndOf="parent" | 75 | app:layout_constraintEnd_toEndOf="parent" |
| 77 | app:layout_constraintStart_toStartOf="parent" | 76 | app:layout_constraintStart_toStartOf="parent" |
| ... | @@ -113,6 +112,7 @@ | ... | @@ -113,6 +112,7 @@ |
| 113 | </androidx.constraintlayout.widget.ConstraintLayout> | 112 | </androidx.constraintlayout.widget.ConstraintLayout> |
| 114 | 113 | ||
| 115 | <LinearLayout | 114 | <LinearLayout |
| 115 | + android:id="@+id/ll_date" | ||
| 116 | android:layout_width="wrap_content" | 116 | android:layout_width="wrap_content" |
| 117 | android:layout_height="wrap_content" | 117 | android:layout_height="wrap_content" |
| 118 | android:layout_marginTop="22dp" | 118 | android:layout_marginTop="22dp" |
| ... | @@ -164,11 +164,16 @@ | ... | @@ -164,11 +164,16 @@ |
| 164 | android:textSize="15sp" | 164 | android:textSize="15sp" |
| 165 | android:visibility="gone" /> | 165 | android:visibility="gone" /> |
| 166 | 166 | ||
| 167 | + <View | ||
| 168 | + android:id="@+id/v_spacer" | ||
| 169 | + android:layout_width="match_parent" | ||
| 170 | + android:layout_height="0dp" | ||
| 171 | + tools:layout_height="100dp"/> | ||
| 172 | + | ||
| 167 | <LinearLayout | 173 | <LinearLayout |
| 168 | android:id="@+id/ll_redeem_coupon" | 174 | android:id="@+id/ll_redeem_coupon" |
| 169 | android:layout_width="match_parent" | 175 | android:layout_width="match_parent" |
| 170 | android:layout_height="55dp" | 176 | android:layout_height="55dp" |
| 171 | - android:layout_marginTop="20dp" | ||
| 172 | android:background="@drawable/shape_rectangle_rounded_light_blue_tr" | 177 | android:background="@drawable/shape_rectangle_rounded_light_blue_tr" |
| 173 | android:gravity="center" | 178 | android:gravity="center" |
| 174 | android:orientation="horizontal"> | 179 | android:orientation="horizontal"> |
| ... | @@ -187,7 +192,6 @@ | ... | @@ -187,7 +192,6 @@ |
| 187 | android:id="@+id/ll_success_redeem" | 192 | android:id="@+id/ll_success_redeem" |
| 188 | android:layout_width="match_parent" | 193 | android:layout_width="match_parent" |
| 189 | android:layout_height="55dp" | 194 | android:layout_height="55dp" |
| 190 | - android:layout_marginTop="20dp" | ||
| 191 | android:background="@drawable/shape_rectangle_rounded_light_green" | 195 | android:background="@drawable/shape_rectangle_rounded_light_green" |
| 192 | android:gravity="center" | 196 | android:gravity="center" |
| 193 | android:orientation="horizontal" | 197 | android:orientation="horizontal" | ... | ... |
| ... | @@ -10,17 +10,17 @@ | ... | @@ -10,17 +10,17 @@ |
| 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">View more</string> | 12 | <string name="demo_more">View more</string> |
| 13 | - <string name="demo_less">Λιγότερα</string> | 13 | + <string name="demo_less">View less</string> |
| 14 | <string name="demo_purchases">για αγορές</string> | 14 | <string name="demo_purchases">για αγορές</string> |
| 15 | <string name="demo_valid_until">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">Available 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">Offer terms of use</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">Store near me</string> |
| 23 | - <string name="demo_website">Δες το website</string> | 23 | + <string name="demo_website">View website</string> |
| 24 | <string name="demo_redeem">Get coupon</string> | 24 | <string name="demo_redeem">Get coupon</string> |
| 25 | <string name="demo_success_redeem">Saved to My Coupons</string> | 25 | <string name="demo_success_redeem">Saved to My Coupons</string> |
| 26 | <string name="demo_profile">Το προφίλ μου</string> | 26 | <string name="demo_profile">Το προφίλ μου</string> | ... | ... |
-
Please register or login to post a comment