Showing
8 changed files
with
25 additions
and
15 deletions
| ... | @@ -9,6 +9,7 @@ import android.graphics.Typeface; | ... | @@ -9,6 +9,7 @@ import android.graphics.Typeface; | 
| 9 | import android.os.Bundle; | 9 | import android.os.Bundle; | 
| 10 | import android.text.SpannableStringBuilder; | 10 | import android.text.SpannableStringBuilder; | 
| 11 | import android.text.Spanned; | 11 | import android.text.Spanned; | 
| 12 | +import android.text.style.UnderlineSpan; | ||
| 12 | import android.view.LayoutInflater; | 13 | import android.view.LayoutInflater; | 
| 13 | import android.view.View; | 14 | import android.view.View; | 
| 14 | import android.view.ViewGroup; | 15 | import android.view.ViewGroup; | 
| ... | @@ -256,7 +257,16 @@ public class MarketPassActivity extends Activity implements View.OnClickListener | ... | @@ -256,7 +257,16 @@ public class MarketPassActivity extends Activity implements View.OnClickListener | 
| 256 | // sBuilder.setSpan(typefaceBoldSpan, startIndex, endIndex, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); | 257 | // sBuilder.setSpan(typefaceBoldSpan, startIndex, endIndex, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); | 
| 257 | // mTvPassCount.setText(sBuilder, TextView.BufferType.SPANNABLE); | 258 | // mTvPassCount.setText(sBuilder, TextView.BufferType.SPANNABLE); | 
| 258 | 259 | ||
| 259 | - mTvPassCount.setText(R.string.cos_market_pass_details); | 260 | + String fullText = getString(R.string.cos_market_pass_details); | 
| 261 | + String targetText = "For You"; | ||
| 262 | + int startIndex = fullText.indexOf(targetText); | ||
| 263 | + int endIndex = startIndex + targetText.length(); | ||
| 264 | + SpannableStringBuilder sBuilder = new SpannableStringBuilder(fullText); | ||
| 265 | + sBuilder.setSpan(new UnderlineSpan(), startIndex, endIndex, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); | ||
| 266 | + Typeface typefaceSemiBold = ResourcesCompat.getFont(this, R.font.peridot_semi_bold); | ||
| 267 | + CustomTypefaceSpan typefaceSemiBoldSpan = new CustomTypefaceSpan(typefaceSemiBold); | ||
| 268 | + sBuilder.setSpan(typefaceSemiBoldSpan, startIndex, endIndex, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); | ||
| 269 | + mTvPassCount.setText(sBuilder, TextView.BufferType.SPANNABLE); | ||
| 260 | // } | 270 | // } | 
| 261 | 271 | ||
| 262 | // if (mMarketPassDetails != null) { | 272 | // if (mMarketPassDetails != null) { | ... | ... | 
| ... | @@ -431,7 +431,7 @@ | ... | @@ -431,7 +431,7 @@ | 
| 431 | android:id="@+id/v_first_end" | 431 | android:id="@+id/v_first_end" | 
| 432 | android:layout_width="8dp" | 432 | android:layout_width="8dp" | 
| 433 | android:layout_height="8dp" | 433 | android:layout_height="8dp" | 
| 434 | - android:background="@drawable/shape_indicator_grey" | 434 | + android:background="@drawable/shape_indicator" | 
| 435 | android:visibility="gone" /> | 435 | android:visibility="gone" /> | 
| 436 | 436 | ||
| 437 | <View | 437 | <View | 
| ... | @@ -450,7 +450,7 @@ | ... | @@ -450,7 +450,7 @@ | 
| 450 | android:id="@+id/v_second_end" | 450 | android:id="@+id/v_second_end" | 
| 451 | android:layout_width="8dp" | 451 | android:layout_width="8dp" | 
| 452 | android:layout_height="8dp" | 452 | android:layout_height="8dp" | 
| 453 | - android:background="@drawable/shape_indicator_grey" /> | 453 | + android:background="@drawable/shape_indicator" /> | 
| 454 | </LinearLayout> | 454 | </LinearLayout> | 
| 455 | 455 | ||
| 456 | <LinearLayout | 456 | <LinearLayout | 
| ... | @@ -824,7 +824,7 @@ | ... | @@ -824,7 +824,7 @@ | 
| 824 | android:layout_width="16dp" | 824 | android:layout_width="16dp" | 
| 825 | android:layout_height="16dp" | 825 | android:layout_height="16dp" | 
| 826 | android:layout_marginStart="2dp" | 826 | android:layout_marginStart="2dp" | 
| 827 | - android:background="@drawable/shape_cos_counter_magenta" | 827 | + android:background="@drawable/shape_cos_counter_orange" | 
| 828 | android:gravity="center" | 828 | android:gravity="center" | 
| 829 | android:orientation="vertical" | 829 | android:orientation="vertical" | 
| 830 | app:layout_constraintBottom_toTopOf="@+id/tv_vouchers_info_title_disabled" | 830 | app:layout_constraintBottom_toTopOf="@+id/tv_vouchers_info_title_disabled" | 
| ... | @@ -838,7 +838,7 @@ | ... | @@ -838,7 +838,7 @@ | 
| 838 | android:includeFontPadding="false" | 838 | android:includeFontPadding="false" | 
| 839 | android:maxLines="1" | 839 | android:maxLines="1" | 
| 840 | android:text="0" | 840 | android:text="0" | 
| 841 | - android:textColor="@color/white" | 841 | + android:textColor="@color/cos_light_black" | 
| 842 | android:textSize="12sp" /> | 842 | android:textSize="12sp" /> | 
| 843 | </LinearLayout> | 843 | </LinearLayout> | 
| 844 | </androidx.constraintlayout.widget.ConstraintLayout> | 844 | </androidx.constraintlayout.widget.ConstraintLayout> | ... | ... | 
| ... | @@ -64,7 +64,7 @@ | ... | @@ -64,7 +64,7 @@ | 
| 64 | android:layout_alignParentEnd="true" | 64 | android:layout_alignParentEnd="true" | 
| 65 | android:layout_marginTop="4dp" | 65 | android:layout_marginTop="4dp" | 
| 66 | android:layout_marginEnd="1dp" | 66 | android:layout_marginEnd="1dp" | 
| 67 | - android:background="@drawable/shape_cos_counter_magenta" | 67 | + android:background="@drawable/shape_cos_counter_orange" | 
| 68 | android:gravity="center" | 68 | android:gravity="center" | 
| 69 | android:orientation="vertical" | 69 | android:orientation="vertical" | 
| 70 | android:translationZ="2dp" | 70 | android:translationZ="2dp" | 
| ... | @@ -78,7 +78,7 @@ | ... | @@ -78,7 +78,7 @@ | 
| 78 | android:layout_height="16dp" | 78 | android:layout_height="16dp" | 
| 79 | android:includeFontPadding="false" | 79 | android:includeFontPadding="false" | 
| 80 | android:maxLines="1" | 80 | android:maxLines="1" | 
| 81 | - android:textColor="@color/white" | 81 | + android:textColor="@color/cos_light_black" | 
| 82 | android:textSize="12sp" | 82 | android:textSize="12sp" | 
| 83 | tools:text="6" /> | 83 | tools:text="6" /> | 
| 84 | </LinearLayout> | 84 | </LinearLayout> | ... | ... | 
| ... | @@ -64,7 +64,7 @@ | ... | @@ -64,7 +64,7 @@ | 
| 64 | android:layout_alignParentEnd="true" | 64 | android:layout_alignParentEnd="true" | 
| 65 | android:layout_marginTop="4dp" | 65 | android:layout_marginTop="4dp" | 
| 66 | android:layout_marginEnd="1dp" | 66 | android:layout_marginEnd="1dp" | 
| 67 | - android:background="@drawable/shape_cos_counter_magenta" | 67 | + android:background="@drawable/shape_cos_counter_orange" | 
| 68 | android:gravity="center" | 68 | android:gravity="center" | 
| 69 | android:orientation="vertical" | 69 | android:orientation="vertical" | 
| 70 | android:translationZ="2dp" | 70 | android:translationZ="2dp" | 
| ... | @@ -77,7 +77,7 @@ | ... | @@ -77,7 +77,7 @@ | 
| 77 | android:layout_height="16dp" | 77 | android:layout_height="16dp" | 
| 78 | android:includeFontPadding="false" | 78 | android:includeFontPadding="false" | 
| 79 | android:maxLines="1" | 79 | android:maxLines="1" | 
| 80 | - android:textColor="@color/white" | 80 | + android:textColor="@color/cos_light_black" | 
| 81 | android:textSize="12sp" | 81 | android:textSize="12sp" | 
| 82 | tools:text="6" /> | 82 | tools:text="6" /> | 
| 83 | </LinearLayout> | 83 | </LinearLayout> | ... | ... | 
| ... | @@ -64,7 +64,7 @@ | ... | @@ -64,7 +64,7 @@ | 
| 64 | android:layout_alignParentEnd="true" | 64 | android:layout_alignParentEnd="true" | 
| 65 | android:layout_marginTop="4dp" | 65 | android:layout_marginTop="4dp" | 
| 66 | android:layout_marginEnd="1dp" | 66 | android:layout_marginEnd="1dp" | 
| 67 | - android:background="@drawable/shape_cos_counter_magenta" | 67 | + android:background="@drawable/shape_cos_counter_orange" | 
| 68 | android:gravity="center" | 68 | android:gravity="center" | 
| 69 | android:orientation="vertical" | 69 | android:orientation="vertical" | 
| 70 | android:translationZ="2dp" | 70 | android:translationZ="2dp" | 
| ... | @@ -77,7 +77,7 @@ | ... | @@ -77,7 +77,7 @@ | 
| 77 | android:layout_height="16dp" | 77 | android:layout_height="16dp" | 
| 78 | android:includeFontPadding="false" | 78 | android:includeFontPadding="false" | 
| 79 | android:maxLines="1" | 79 | android:maxLines="1" | 
| 80 | - android:textColor="@color/white" | 80 | + android:textColor="@color/cos_light_black" | 
| 81 | android:textSize="12sp" | 81 | android:textSize="12sp" | 
| 82 | tools:text="6" /> | 82 | tools:text="6" /> | 
| 83 | </LinearLayout> | 83 | </LinearLayout> | ... | ... | 
| ... | @@ -64,7 +64,7 @@ | ... | @@ -64,7 +64,7 @@ | 
| 64 | android:layout_alignParentEnd="true" | 64 | android:layout_alignParentEnd="true" | 
| 65 | android:layout_marginTop="4dp" | 65 | android:layout_marginTop="4dp" | 
| 66 | android:layout_marginEnd="1dp" | 66 | android:layout_marginEnd="1dp" | 
| 67 | - android:background="@drawable/shape_cos_counter_magenta" | 67 | + android:background="@drawable/shape_cos_counter_orange" | 
| 68 | android:gravity="center" | 68 | android:gravity="center" | 
| 69 | android:orientation="vertical" | 69 | android:orientation="vertical" | 
| 70 | android:translationZ="2dp" | 70 | android:translationZ="2dp" | 
| ... | @@ -77,7 +77,7 @@ | ... | @@ -77,7 +77,7 @@ | 
| 77 | android:layout_height="16dp" | 77 | android:layout_height="16dp" | 
| 78 | android:includeFontPadding="false" | 78 | android:includeFontPadding="false" | 
| 79 | android:maxLines="1" | 79 | android:maxLines="1" | 
| 80 | - android:textColor="@color/white" | 80 | + android:textColor="@color/cos_light_black" | 
| 81 | android:textSize="12sp" | 81 | android:textSize="12sp" | 
| 82 | tools:text="6" /> | 82 | tools:text="6" /> | 
| 83 | </LinearLayout> | 83 | </LinearLayout> | ... | ... | 
| ... | @@ -193,7 +193,7 @@ | ... | @@ -193,7 +193,7 @@ | 
| 193 | <string name="cos_market_ab_subtitle">1. Ενεργοποίησε τον κωδικό στην ΑΒ PLUS στο kiosk του καταστήματος ή μέσω AB eshop/app στην ενότητα Συνεργασίες – SUPERMARKET DEALS.\n\n2. Κάνε χρήση της ΑΒ PLUS στις αγορές σου για να λάβεις τις διαθέσιμες εκπτώσεις.</string> | 193 | <string name="cos_market_ab_subtitle">1. Ενεργοποίησε τον κωδικό στην ΑΒ PLUS στο kiosk του καταστήματος ή μέσω AB eshop/app στην ενότητα Συνεργασίες – SUPERMARKET DEALS.\n\n2. Κάνε χρήση της ΑΒ PLUS στις αγορές σου για να λάβεις τις διαθέσιμες εκπτώσεις.</string> | 
| 194 | <string name="cos_market_pass_title">SUPERMARKET DEALS CARD</string> | 194 | <string name="cos_market_pass_title">SUPERMARKET DEALS CARD</string> | 
| 195 | <string name="cos_market_pass_subtitle">Χρησιμοποίησε το μοναδικό κωδικό σου για να κερδίσεις έκπτωση σε επιλεγμένα προϊόντα. Ανακάλυψε τα κουπόνια στο For You.</string> | 195 | <string name="cos_market_pass_subtitle">Χρησιμοποίησε το μοναδικό κωδικό σου για να κερδίσεις έκπτωση σε επιλεγμένα προϊόντα. Ανακάλυψε τα κουπόνια στο For You.</string> | 
| 196 | - <string name="cos_market_pass_details">Χρησιμοποίησε τη SUPERMARKET DEALS CARD σου για να κερδίσεις έκπτωση σε επιλεγμένα προϊόντα. Ανακάλυψε τα διαθέσιμα εκπτωτικά κουπόνια στο For You.</string> | 196 | + <string name="cos_market_pass_details">Χρησιμοποίησε τη SUPERMARKET DEALS CARD σου και κέρδισε έκπτωση σε επιλεγμένα προϊόντα. Ανακάλυψε τα προϊόντα με εκπτωτικό κουπόνι στο For You.</string> | 
| 197 | <string name="cos_market_pass_return">Επιστροφή</string> | 197 | <string name="cos_market_pass_return">Επιστροφή</string> | 
| 198 | <string name="cos_market_pass_coupons_title">Με τα διαθέσιμα κουπόνια μπορείς να εξοικονομήσεις έως και %1$s€.</string> | 198 | <string name="cos_market_pass_coupons_title">Με τα διαθέσιμα κουπόνια μπορείς να εξοικονομήσεις έως και %1$s€.</string> | 
| 199 | <string name="cos_market_subtitle">Δημιούργησε το δικό σου ενιαίο κουπόνι προσφορών, και εξαργύρωσέ το στα supermarket της επιλογής σου γρήγορα και εύκολα με ένα μόνο κωδικό κουπονιού!</string> | 199 | <string name="cos_market_subtitle">Δημιούργησε το δικό σου ενιαίο κουπόνι προσφορών, και εξαργύρωσέ το στα supermarket της επιλογής σου γρήγορα και εύκολα με ένα μόνο κωδικό κουπονιού!</string> | ... | ... | 
- 
Please register or login to post a comment