mirror of
https://github.com/CatimaLoyalty/Android.git
synced 2026-04-03 07:11:45 -04:00
Make header colour code more consistent (#1363)
- Ensure a header colour is picked for the main screen - Simplify all different header colour code pickers into a single code path
This commit is contained in:
@@ -613,12 +613,7 @@ public class LoyaltyCardViewActivity extends CatimaAppCompatActivity implements
|
||||
dialog.show();
|
||||
});
|
||||
|
||||
int backgroundHeaderColor;
|
||||
if (loyaltyCard.headerColor != null) {
|
||||
backgroundHeaderColor = loyaltyCard.headerColor;
|
||||
} else {
|
||||
backgroundHeaderColor = LetterBitmap.getDefaultColor(this, loyaltyCard.store);
|
||||
}
|
||||
int backgroundHeaderColor = Utils.getHeaderColor(this, loyaltyCard);
|
||||
|
||||
// Also apply colours to UI elements
|
||||
int darkenedColor = ColorUtils.blendARGB(backgroundHeaderColor, Color.BLACK, 0.1f);
|
||||
|
||||
Reference in New Issue
Block a user