mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-09-10 20:23:18 +02:00
AMOLED theme now has dark snackbar
This commit is contained in:
parent
9fd7083db8
commit
af8ddac007
@ -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
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="@color/snackbarBackground"/>
|
||||
<solid android:color="?snackbar_background"/>
|
||||
<corners android:radius="4dp"/>
|
||||
</shape>
|
@ -31,6 +31,8 @@
|
||||
<item name="text_color_primary">@color/textColorPrimaryDark</item>
|
||||
<item name="background_card">@color/cardBackground</item>
|
||||
<item name="icon_color">@color/iconColorDark</item>
|
||||
<item name="snackbar_background">@color/snackbarBackground</item>
|
||||
<item name="snackbar_text">@color/textColorPrimaryLight</item>
|
||||
<item name="android:navigationBarColor">@color/oldNavBarBackground</item>
|
||||
</style>
|
||||
|
||||
@ -54,6 +56,8 @@
|
||||
<item name="colorPrimary">@color/colorAmoledPrimary</item>
|
||||
<item name="colorPrimaryDark">@color/colorAmoledPrimary</item>
|
||||
<item name="android:colorBackground">@color/md_black_1000</item>
|
||||
<item name="snackbar_background">@color/trueSnackbarBackground</item>
|
||||
<item name="snackbar_text">@color/textColorPrimaryDark</item>
|
||||
|
||||
<!-- Custom Attributes-->
|
||||
<item name="selectable_list_drawable">@drawable/list_item_selector_amoled</item>
|
||||
|
@ -26,4 +26,6 @@
|
||||
<attr name="text_color_primary" format="reference|integer"/>
|
||||
<attr name="background_card" format="reference|integer"/>
|
||||
<attr name="icon_color" format="reference|integer"/>
|
||||
<attr name="snackbar_background" format="reference|integer"/>
|
||||
<attr name="snackbar_text" format="reference|integer"/>
|
||||
</resources>
|
||||
|
@ -7,6 +7,7 @@
|
||||
<color name="drawerPrimary">@color/colorPrimary</color>
|
||||
<color name="cardBackground">#FFFFFF</color>
|
||||
<color name="snackbarBackground">#323232</color>
|
||||
<color name="trueSnackbarBackground">#323232</color>
|
||||
<color name="dialogBackground">@color/md_white_1000</color>
|
||||
<color name="rippleColor">@color/md_black_1000_12</color>
|
||||
<color name="colorAccent">@color/md_blue_A400</color>
|
||||
|
@ -38,6 +38,8 @@
|
||||
<item name="text_color_primary">@color/textColorPrimaryLight</item>
|
||||
<item name="background_card">@color/cardBackground</item>
|
||||
<item name="icon_color">@color/iconColorLight</item>
|
||||
<item name="snackbar_background">@color/snackbarBackground</item>
|
||||
<item name="snackbar_text">@color/textColorPrimaryDark</item>
|
||||
|
||||
<item name="android:statusBarColor">@android:color/transparent</item>
|
||||
<item name="android:navigationBarColor">#B3000000</item>
|
||||
|
Loading…
Reference in New Issue
Block a user