]> git.ktnx.net Git - mobile-ledger.git/commitdiff
style for error texts
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Thu, 14 May 2020 10:30:25 +0000 (13:30 +0300)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Thu, 14 May 2020 17:39:53 +0000 (17:39 +0000)
app/src/main/java/net/ktnx/mobileledger/utils/Colors.java
app/src/main/res/values/colors.xml
app/src/main/res/values/styles.xml

index fcb6d8b06fa0d745092a89e36bcf0e0d039af931..8049d76ba2fa388ef9cfb6c9789da18c12ad1a20 100644 (file)
@@ -57,6 +57,7 @@ public class Colors {
     public static int primary, defaultTextColor, defaultTextColorDisabled;
     public static int profileThemeId = -1;
     public static MutableLiveData<Integer> 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);
index 89d9c379e2660e457820b7cc8d5d644ed649e561..3bbc35c18d58637014db97695a769a180aec29d9 100644 (file)
@@ -25,4 +25,5 @@
     <color name="table_row_light_bg">#28ddcbff</color>
     <color name="header_border">#804a148c</color>
     <color name="error_background">#FFE1E2</color>
+    <color name="errorTextColor">#CD1609</color>
 </resources>
index 4929826cec54e335a7ce303591d25f0527090808..71cb42c28003444d033f29235d11a0a526271c8a 100644 (file)
@@ -26,6 +26,7 @@
         <item name="table_row_dark_bg">#286c33d4</item>
         <item name="table_row_light_bg">#28ddcbff</item>
         <item name="textColor">@android:color/tab_indicator_text</item>
+        <item name="errorTextColor">@color/errorTextColor</item>
     </style>
 
     <style name="StretchedTextView" parent="Widget.AppCompat.TextView"></style>