pull/801/head
gedoor 4 years ago
parent c13bfae5ef
commit ba40d55de1
  1. 11
      app/src/main/java/io/legado/app/ui/book/read/ReadMenu.kt

@ -37,7 +37,6 @@ class ReadMenu @JvmOverloads constructor(
private lateinit var menuTopOut: Animation private lateinit var menuTopOut: Animation
private lateinit var menuBottomIn: Animation private lateinit var menuBottomIn: Animation
private lateinit var menuBottomOut: Animation private lateinit var menuBottomOut: Animation
private val accentColor: Int = context.accentColor
private val bgColor: Int = context.bottomBackground private val bgColor: Int = context.bottomBackground
private val textColor: Int = context.getPrimaryTextColor(ColorUtils.isColorLight(bgColor)) private val textColor: Int = context.getPrimaryTextColor(ColorUtils.isColorLight(bgColor))
private val bottomBackgroundList: ColorStateList = Selector.colorBuild() private val bottomBackgroundList: ColorStateList = Selector.colorBuild()
@ -66,13 +65,13 @@ class ReadMenu @JvmOverloads constructor(
llBrightness.background = brightnessBackground llBrightness.background = brightnessBackground
llBottomBg.setBackgroundColor(bgColor) llBottomBg.setBackgroundColor(bgColor)
fabSearch.backgroundTintList = bottomBackgroundList fabSearch.backgroundTintList = bottomBackgroundList
fabSearch.setColorFilter(accentColor) fabSearch.setColorFilter(textColor)
fabAutoPage.backgroundTintList = bottomBackgroundList fabAutoPage.backgroundTintList = bottomBackgroundList
fabAutoPage.setColorFilter(accentColor) fabAutoPage.setColorFilter(textColor)
fabReplaceRule.backgroundTintList = bottomBackgroundList fabReplaceRule.backgroundTintList = bottomBackgroundList
fabReplaceRule.setColorFilter(accentColor) fabReplaceRule.setColorFilter(textColor)
fabNightTheme.backgroundTintList = bottomBackgroundList fabNightTheme.backgroundTintList = bottomBackgroundList
fabNightTheme.setColorFilter(accentColor) fabNightTheme.setColorFilter(textColor)
tvPre.setTextColor(textColor) tvPre.setTextColor(textColor)
tvNext.setTextColor(textColor) tvNext.setTextColor(textColor)
ivCatalog.setColorFilter(textColor) ivCatalog.setColorFilter(textColor)
@ -309,7 +308,7 @@ class ReadMenu @JvmOverloads constructor(
fabAutoPage.setImageResource(R.drawable.ic_auto_page) fabAutoPage.setImageResource(R.drawable.ic_auto_page)
fabAutoPage.contentDescription = context.getString(R.string.auto_next_page) fabAutoPage.contentDescription = context.getString(R.string.auto_next_page)
} }
fabAutoPage.setColorFilter(accentColor) fabAutoPage.setColorFilter(textColor)
} }
interface CallBack { interface CallBack {

Loading…
Cancel
Save