Color fixing

For extensions button on lower androids and highlighted tab in dark theme
This commit is contained in:
Jay 2020-02-05 01:49:30 -08:00
parent f0f889e6bb
commit 7544a4d2db
7 changed files with 13 additions and 15 deletions

View File

@ -1,10 +1,8 @@
package eu.kanade.tachiyomi.ui.extension
import android.content.res.ColorStateList
import android.graphics.Color
import android.view.View
import androidx.core.content.ContextCompat
import androidx.vectordrawable.graphics.drawable.VectorDrawableCompat
import eu.kanade.tachiyomi.R
import eu.kanade.tachiyomi.data.glide.GlideApp
import eu.kanade.tachiyomi.extension.model.Extension
@ -12,6 +10,7 @@ import eu.kanade.tachiyomi.extension.model.InstallStep
import eu.kanade.tachiyomi.ui.base.holder.BaseFlexibleViewHolder
import eu.kanade.tachiyomi.ui.base.holder.SlicedHolder
import eu.kanade.tachiyomi.util.system.LocaleHelper
import eu.kanade.tachiyomi.util.system.getResourceColor
import io.github.mthli.slice.Slice
import kotlinx.android.synthetic.main.extension_card_item.*
@ -64,6 +63,7 @@ class ExtensionHolder(view: View, override val adapter: ExtensionAdapter) :
//background = VectorDrawableCompat.create(resources!!, R.drawable.button_bg_transparent, null)
setTextColor(ContextCompat.getColorStateList(context, R.drawable.button_text_state))
backgroundTintList = ContextCompat.getColorStateList(context, R.drawable.button_bg_transparent)
val extension = item.extension
@ -84,14 +84,12 @@ class ExtensionHolder(view: View, override val adapter: ExtensionAdapter) :
when {
extension.hasUpdate -> {
isActivated = true
// backgroundTintList = ColorStateList(arrayOf(intArrayOf(0)), intArrayOf(Color
//.BLACK))
backgroundTintList = ColorStateList.valueOf(
context.getResourceColor(R.attr.colorAccent))
setText(R.string.ext_update)
}
extension.isObsolete -> {
// Red outline
// background = VectorDrawableCompat.create(resources, R.drawable
// .button_bg_error, null)
setTextColor(ContextCompat.getColorStateList(context, R.drawable.button_bg_error))
setText(R.string.ext_obsolete)

View File

@ -49,8 +49,8 @@
android:theme="@style/Theme.ActionBar.Tab"
android:background="?colorPrimary"
app:tabRippleColor="@color/rippleColor"
app:tabIndicatorColor="?attr/tabBarIconColor"
app:tabTextColor="?attr/tabBarIconColor"
app:tabIndicatorColor="?attr/actionBarTintColor"
app:tabTextColor="?attr/actionBarTintColor"
app:tabInlineLabel="true"
app:tabGravity="center"
app:tabMode="auto"

View File

@ -15,7 +15,7 @@
<color name="purePrimary">#212121</color>
<color name="splashBackground">#212121</color>
<color name="actionModeShadow">@color/md_white_1000_38</color>
<color name="badgeColor">#3399FF</color>
<color name="tabBarIconHighlight">@color/colorAccent</color>
<color name="textColorPrimary">@color/md_white_1000</color>
<color name="textColorSecondary">@color/md_white_1000_70</color>

View File

@ -9,7 +9,7 @@
</style>
<style name="Theme.Tachiyomi.MatWhite" parent="Theme.Tachiyomi">
<item name="tabBarIconColor">@color/md_white_1000</item>
<item name="tabBarIconColor">@color/tabBarIconHighlight</item>
<item name="tabBarIconInactive">@color/md_white_1000_76</item>
</style>
@ -17,6 +17,7 @@
<item name="colorPrimary">#54759E</item>
<item name="colorPrimaryDark">#54759E</item>
<item name="badgeColor">@color/material_red_accent_700</item>
<item name="tabBarIconColor">@color/md_white_1000</item>
</style>
<!--==============-->

View File

@ -6,9 +6,8 @@
<item name="colorOnPrimary">@color/colorPrimary</item>
<item name="actionBarTintColor">@color/textColorPrimary</item>
<item name="actionBarTheme">@style/ThemeOverlay.AppCompat.DayNight.ActionBar</item>
<item name="tabBarIconColor">@color/colorPrimary</item>
<item name="tabBarIconColor">@color/colorAccent</item>
<item name="tabBarIconInactive">@color/colorPrimaryInactive</item>
<item name="badgeColor">@color/colorAccent</item>
<item name="android:statusBarColor">@android:color/transparent</item>
</style>
</resources>

View File

@ -32,6 +32,7 @@
<color name="divider">@color/md_black_1000_12</color>
<color name="oldNavBarBackground">#B3FFFFFF</color>
<color name="badgeColor">@color/material_red_accent_700</color>
<color name="tabBarIconHighlight">@color/md_white_1000</color>
<color name="preference_fallback_accent_color">@color/colorAccent</color>
<color name="darkPrimaryColor">#212121</color>

View File

@ -24,7 +24,7 @@
<item name="android:divider">@color/divider</item>
<item name="android:listDivider">@drawable/line_divider_light</item>
<item name="actionModeStyle">@style/CustomActionModeStyle</item>
<item name="tabBarIconColor">@color/md_white_1000</item>
<item name="tabBarIconColor">@color/tabBarIconHighlight</item>
<item name="tabBarIconInactive">@color/md_white_1000_76</item>
@ -68,7 +68,6 @@
<item name="tabBarIconColor">@color/colorPrimary</item>
<item name="tabBarIconInactive">@color/colorPrimaryInactive</item>
<item name="android:statusBarColor">@color/md_black_1000_54</item>
<item name="badgeColor">@color/colorAccent</item>
</style>
<style name="Theme.Tachiyomi.DarkBlue" parent="Theme.Tachiyomi"/>
<style name="Theme.Tachiyomi.Amoled" parent="Theme.Tachiyomi"/>