From 2bcb64a8506bc7fd191ce3a0a916d8b1dae71da8 Mon Sep 17 00:00:00 2001 From: Damyan Ivanov Date: Fri, 7 May 2021 18:32:06 +0300 Subject: [PATCH] use the primary theme colour for transaction list accents a bit more readable in dark mode --- .../ui/transaction_list/TransactionRowHolder.java | 4 ++-- app/src/main/java/net/ktnx/mobileledger/utils/Colors.java | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/net/ktnx/mobileledger/ui/transaction_list/TransactionRowHolder.java b/app/src/main/java/net/ktnx/mobileledger/ui/transaction_list/TransactionRowHolder.java index 35fdcecf..2edf59cb 100644 --- a/app/src/main/java/net/ktnx/mobileledger/ui/transaction_list/TransactionRowHolder.java +++ b/app/src/main/java/net/ktnx/mobileledger/ui/transaction_list/TransactionRowHolder.java @@ -91,8 +91,8 @@ class TransactionRowHolder extends TransactionRowHolderBase { if ((boldAccountName != null) && acc.getAccountName() .startsWith(boldAccountName)) { - accName.setTextColor(Colors.secondary); - accAmount.setTextColor(Colors.secondary); + accName.setTextColor(Colors.primary); + accAmount.setTextColor(Colors.primary); SpannableString ss = new SpannableString(acc.getAccountName()); ss.setSpan(new StyleSpan(Typeface.BOLD), 0, boldAccountName.length(), diff --git a/app/src/main/java/net/ktnx/mobileledger/utils/Colors.java b/app/src/main/java/net/ktnx/mobileledger/utils/Colors.java index fa56c19f..7cf710ac 100644 --- a/app/src/main/java/net/ktnx/mobileledger/utils/Colors.java +++ b/app/src/main/java/net/ktnx/mobileledger/utils/Colors.java @@ -68,7 +68,7 @@ public class Colors { }; private static final HashMap themePrimaryColor = new HashMap<>(); public static @ColorInt - int secondary; + int primary; @ColorInt public static int tableRowDarkBG; public static int profileThemeId = DEFAULT_HUE_DEG; @@ -76,8 +76,8 @@ public class Colors { TypedValue tv = new TypedValue(); theme.resolveAttribute(R.attr.table_row_dark_bg, tv, true); tableRowDarkBG = tv.data; - theme.resolveAttribute(R.attr.colorSecondary, tv, true); - secondary = tv.data; + theme.resolveAttribute(R.attr.colorPrimary, tv, true); + primary = tv.data; if (themePrimaryColor.size() == 0) { for (int themeId : themeIDs) { -- 2.39.5