Panagiotis Triantafyllou

ui fixes

......@@ -464,6 +464,11 @@ public class LoyaltyWallet extends Activity implements View.OnClickListener, Vie
// First Expandable Banner
String badgeValueFirst = String.format("%.02f", WarplyManagerHelper.getDealsCouponsSum());
mTvDealsValue.setText(String.format(getString(R.string.cos_value), badgeValueFirst));
if (String.valueOf(WarplyManagerHelper.getDealsCouponsSum()).length() >= 3) {
mTvDealsValue.setTextSize(12);
} else {
mTvDealsValue.setTextSize(14);
}
SpannableStringBuilder sBuilder = new SpannableStringBuilder();
sBuilder.append(String.format(getString(R.string.cos_deals_win_title_cos), badgeValueFirst));
CalligraphyTypefaceSpan typefaceBoldSpanFirst = new CalligraphyTypefaceSpan(TypefaceUtils.load(getAssets(), "fonts/PeridotPE-Bold.ttf"));
......@@ -475,6 +480,11 @@ public class LoyaltyWallet extends Activity implements View.OnClickListener, Vie
if (WarplyManagerHelper.getLoyaltyBadge() != null && (WarplyManagerHelper.getLoyaltyBadge().getCouponCount() > 0 || WarplyManagerHelper.getLoyaltyBadge().getCouponCount() == 0)) {
String badgeValue = String.format("%.02f", WarplyManagerHelper.getLoyaltyBadge().getValue());
mTvGiftsValue.setText(String.format(getString(R.string.cos_value), badgeValue));
if (String.valueOf(WarplyManagerHelper.getLoyaltyBadge().getValue()).length() >= 3) {
mTvGiftsValue.setTextSize(12);
} else {
mTvGiftsValue.setTextSize(14);
}
SpannableStringBuilder sBuilderSecond = new SpannableStringBuilder();
sBuilderSecond.append(String.format(getString(R.string.cos_deals_win_title), badgeValue));
CalligraphyTypefaceSpan typefaceBoldSpanSecond = new CalligraphyTypefaceSpan(TypefaceUtils.load(getAssets(), "fonts/PeridotPE-Bold.ttf"));
......@@ -498,6 +508,11 @@ public class LoyaltyWallet extends Activity implements View.OnClickListener, Vie
mFavValue += countValue;
String badgeValue = String.format("%.02f", countValue);
mTvMarketValue.setText(String.format(getString(R.string.cos_value), badgeValue));
if (String.valueOf(countValue).length() >= 3) {
mTvMarketValue.setTextSize(12);
} else {
mTvMarketValue.setTextSize(14);
}
SpannableStringBuilder sBuilderThird = new SpannableStringBuilder();
sBuilderThird.append(String.format(getString(R.string.cos_supermarket_win), badgeValue));
CalligraphyTypefaceSpan typefaceBoldSpanThird = new CalligraphyTypefaceSpan(TypefaceUtils.load(getAssets(), "fonts/PeridotPE-Bold.ttf"));
......@@ -511,6 +526,11 @@ public class LoyaltyWallet extends Activity implements View.OnClickListener, Vie
// Sum Expandable Banner
String allValue = String.format("%.02f", mFavValue);
mTvFavValue.setText(String.format(getString(R.string.cos_value), allValue));
if (String.valueOf(mFavValue).length() >= 3) {
mTvFavValue.setTextSize(12);
} else {
mTvFavValue.setTextSize(14);
}
SpannableStringBuilder sBuilderExp = new SpannableStringBuilder();
sBuilderExp.append(String.format(getString(R.string.cos_for_you_all), allValue));
CalligraphyTypefaceSpan typefaceBoldExp = new CalligraphyTypefaceSpan(TypefaceUtils.load(getAssets(), "fonts/PeridotPE-Bold.ttf"));
......