Editable card ID and barcode type

This commit is contained in:
Sylvia van Os committed 2020-11-10 22:05:53 +01:00
1 parent 1641631bdc
commit e601d1a659
4 files changed
+120 -73

No files matched your search

@@ -197,17 +197,6 @@ public class LoyaltyCardViewActivity extends AppCompatActivity
storeName.setText(loyaltyCard.store);
storeName.setTextSize(settings.getCardTitleFontSize());
int textColor;
if(loyaltyCard.headerTextColor != null)
{
textColor = loyaltyCard.headerTextColor;
}
else
{
textColor = Color.WHITE;
}
storeName.setTextColor(textColor);
int backgroundHeaderColor;
if(loyaltyCard.headerColor != null)
{
@@ -220,6 +209,17 @@ public class LoyaltyCardViewActivity extends AppCompatActivity
collapsingToolbarLayout.setBackgroundColor(backgroundHeaderColor);
int textColor;
if(Utils.needsDarkForeground(loyaltyCard.headerColor))
{
textColor = Color.BLACK;
}
else
{
textColor = Color.WHITE;
}
storeName.setTextColor(textColor);
// If the background is very bright, we should use dark icons
backgroundNeedsDarkIcons = Utils.needsDarkForeground(backgroundHeaderColor);
ActionBar actionBar = getSupportActionBar();