]> git.ktnx.net Git - mobile-ledger.git/commitdiff
use the primary theme colour for transaction list accents
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Fri, 7 May 2021 15:32:06 +0000 (18:32 +0300)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Fri, 7 May 2021 15:32:59 +0000 (15:32 +0000)
a bit more readable in dark mode

app/src/main/java/net/ktnx/mobileledger/ui/transaction_list/TransactionRowHolder.java
app/src/main/java/net/ktnx/mobileledger/utils/Colors.java

index 35fdcecf342eb2c6aac1e9471950a214ef84196f..2edf59cb9e1db2abb6c7150af8bd5f3d8dd3b904 100644 (file)
@@ -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(),
index fa56c19fdaead8e9436c74aefa9890ca6effebf9..7cf710ac0067b3b90319190c4f5524679beb38b6 100644 (file)
@@ -68,7 +68,7 @@ public class Colors {
              };
     private static final HashMap<Integer, Integer> 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) {