From af8ddac007f7d24b362032fa80ee98bd905dc77d Mon Sep 17 00:00:00 2001 From: Jay Date: Mon, 16 Dec 2019 20:14:33 -0800 Subject: [PATCH] AMOLED theme now has dark snackbar --- app/src/main/java/eu/kanade/tachiyomi/util/ViewExtensions.kt | 2 +- app/src/main/res/drawable/bg_snackbar.xml | 2 +- app/src/main/res/values-night/themes.xml | 4 ++++ app/src/main/res/values/attrs.xml | 2 ++ app/src/main/res/values/colors.xml | 1 + app/src/main/res/values/themes.xml | 2 ++ 6 files changed, 11 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/util/ViewExtensions.kt b/app/src/main/java/eu/kanade/tachiyomi/util/ViewExtensions.kt index 3a8a0c852e..3f9fa346c9 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/util/ViewExtensions.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/util/ViewExtensions.kt @@ -41,7 +41,7 @@ fun View.snack(message: String, length: Int = Snackbar.LENGTH_SHORT, f: (Snackba Unit)? = null): Snackbar { val snack = Snackbar.make(this, message, length) val textView: TextView = snack.view.findViewById(com.google.android.material.R.id.snackbar_text) - textView.setTextColor(context.getResourceColor(android.R.attr.textColorPrimaryInverse)) + textView.setTextColor(context.getResourceColor(R.attr.snackbar_text)) when { Build.VERSION.SDK_INT >= 23 -> { val leftM = if (this is CoordinatorLayout) 0 else rootWindowInsets.systemWindowInsetLeft diff --git a/app/src/main/res/drawable/bg_snackbar.xml b/app/src/main/res/drawable/bg_snackbar.xml index ab37d237f8..31128e1590 100644 --- a/app/src/main/res/drawable/bg_snackbar.xml +++ b/app/src/main/res/drawable/bg_snackbar.xml @@ -1,6 +1,6 @@ - + \ No newline at end of file diff --git a/app/src/main/res/values-night/themes.xml b/app/src/main/res/values-night/themes.xml index d4252f2faf..f9842d1d60 100644 --- a/app/src/main/res/values-night/themes.xml +++ b/app/src/main/res/values-night/themes.xml @@ -31,6 +31,8 @@ @color/textColorPrimaryDark @color/cardBackground @color/iconColorDark + @color/snackbarBackground + @color/textColorPrimaryLight @color/oldNavBarBackground @@ -54,6 +56,8 @@ @color/colorAmoledPrimary @color/colorAmoledPrimary @color/md_black_1000 + @color/trueSnackbarBackground + @color/textColorPrimaryDark @drawable/list_item_selector_amoled diff --git a/app/src/main/res/values/attrs.xml b/app/src/main/res/values/attrs.xml index 3d0864a354..c66ed577a6 100644 --- a/app/src/main/res/values/attrs.xml +++ b/app/src/main/res/values/attrs.xml @@ -26,4 +26,6 @@ + + diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index 10c8cde17a..b7f8d78db5 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -7,6 +7,7 @@ @color/colorPrimary #FFFFFF #323232 + #323232 @color/md_white_1000 @color/md_black_1000_12 @color/md_blue_A400 diff --git a/app/src/main/res/values/themes.xml b/app/src/main/res/values/themes.xml index ce52db94c8..df6df16bca 100644 --- a/app/src/main/res/values/themes.xml +++ b/app/src/main/res/values/themes.xml @@ -38,6 +38,8 @@ @color/textColorPrimaryLight @color/cardBackground @color/iconColorLight + @color/snackbarBackground + @color/textColorPrimaryDark @android:color/transparent #B3000000