From 7e5e80f46a3f2259808b2b8bd7293f1bb8a26f06 Mon Sep 17 00:00:00 2001 From: Damyan Ivanov Date: Thu, 14 May 2020 13:30:25 +0300 Subject: [PATCH] style for error texts --- app/src/main/java/net/ktnx/mobileledger/utils/Colors.java | 3 +++ app/src/main/res/values/colors.xml | 1 + app/src/main/res/values/styles.xml | 1 + 3 files changed, 5 insertions(+) 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 fcb6d8b0..8049d76b 100644 --- a/app/src/main/java/net/ktnx/mobileledger/utils/Colors.java +++ b/app/src/main/java/net/ktnx/mobileledger/utils/Colors.java @@ -57,6 +57,7 @@ public class Colors { public static int primary, defaultTextColor, defaultTextColorDisabled; public static int profileThemeId = -1; public static MutableLiveData themeWatch = new MutableLiveData<>(0); + public static int errorTextColor; private static int[] themeIDs = {R.style.AppTheme_NoActionBar_000, R.style.AppTheme_NoActionBar_005, R.style.AppTheme_NoActionBar_010, R.style.AppTheme_NoActionBar_015, @@ -108,6 +109,8 @@ public class Colors { defaultTextColorDisabled = 0x7f000000 | 0x00ffffff & defaultTextColor; theme.resolveAttribute(R.attr.colorAccent, tv, true); accent = tv.data; + theme.resolveAttribute(R.attr.errorTextColor, tv, true); + errorTextColor = tv.data; // trigger theme observers themeWatch.postValue(themeWatch.getValue() + 1); diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index 89d9c379..3bbc35c1 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -25,4 +25,5 @@ #28ddcbff #804a148c #FFE1E2 + #CD1609 diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index 4929826c..71cb42c2 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -26,6 +26,7 @@ #286c33d4 #28ddcbff @android:color/tab_indicator_text + @color/errorTextColor -- 2.39.2