|
|
@ -24,8 +24,7 @@ import io.legado.app.model.ReadBook |
|
|
|
import io.legado.app.ui.browser.WebViewActivity |
|
|
|
import io.legado.app.ui.browser.WebViewActivity |
|
|
|
import io.legado.app.ui.widget.seekbar.SeekBarChangeListener |
|
|
|
import io.legado.app.ui.widget.seekbar.SeekBarChangeListener |
|
|
|
import io.legado.app.utils.* |
|
|
|
import io.legado.app.utils.* |
|
|
|
import splitties.views.onClick |
|
|
|
import splitties.views.* |
|
|
|
import splitties.views.onLongClick |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 阅读界面菜单 |
|
|
|
* 阅读界面菜单 |
|
|
@ -84,7 +83,6 @@ class ReadMenu @JvmOverloads constructor( |
|
|
|
brightnessBackground.setColor(ColorUtils.adjustAlpha(bgColor, 0.5f)) |
|
|
|
brightnessBackground.setColor(ColorUtils.adjustAlpha(bgColor, 0.5f)) |
|
|
|
llBrightness.background = brightnessBackground |
|
|
|
llBrightness.background = brightnessBackground |
|
|
|
llBottomBg.setBackgroundColor(bgColor) |
|
|
|
llBottomBg.setBackgroundColor(bgColor) |
|
|
|
vwNavigationBar.setBackgroundColor(bgColor) |
|
|
|
|
|
|
|
fabSearch.backgroundTintList = bottomBackgroundList |
|
|
|
fabSearch.backgroundTintList = bottomBackgroundList |
|
|
|
fabSearch.setColorFilter(textColor) |
|
|
|
fabSearch.setColorFilter(textColor) |
|
|
|
fabAutoPage.backgroundTintList = bottomBackgroundList |
|
|
|
fabAutoPage.backgroundTintList = bottomBackgroundList |
|
|
@ -104,7 +102,6 @@ class ReadMenu @JvmOverloads constructor( |
|
|
|
ivSetting.setColorFilter(textColor) |
|
|
|
ivSetting.setColorFilter(textColor) |
|
|
|
tvSetting.setTextColor(textColor) |
|
|
|
tvSetting.setTextColor(textColor) |
|
|
|
vwBg.setOnClickListener(null) |
|
|
|
vwBg.setOnClickListener(null) |
|
|
|
vwNavigationBar.setOnClickListener(null) |
|
|
|
|
|
|
|
llBrightness.setOnClickListener(null) |
|
|
|
llBrightness.setOnClickListener(null) |
|
|
|
seekBrightness.post { |
|
|
|
seekBrightness.post { |
|
|
|
seekBrightness.progress = AppConfig.readBrightness |
|
|
|
seekBrightness.progress = AppConfig.readBrightness |
|
|
@ -309,14 +306,19 @@ class ReadMenu @JvmOverloads constructor( |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
override fun onAnimationEnd(animation: Animation) { |
|
|
|
override fun onAnimationEnd(animation: Animation) { |
|
|
|
binding.vwMenuBg.setOnClickListener { runMenuOut() } |
|
|
|
val navigationBarHeight = |
|
|
|
binding.vwNavigationBar.run { |
|
|
|
if (ReadBookConfig.hideNavigationBar) { |
|
|
|
layoutParams = layoutParams.apply { |
|
|
|
|
|
|
|
height = if (ReadBookConfig.hideNavigationBar) { |
|
|
|
|
|
|
|
activity?.navigationBarHeight ?: 0 |
|
|
|
activity?.navigationBarHeight ?: 0 |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
0 |
|
|
|
0 |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
binding.run { |
|
|
|
|
|
|
|
vwMenuBg.setOnClickListener { runMenuOut() } |
|
|
|
|
|
|
|
root.padding = 0 |
|
|
|
|
|
|
|
when (activity?.navigationBarPos) { |
|
|
|
|
|
|
|
3 -> root.bottomPadding = navigationBarHeight |
|
|
|
|
|
|
|
1 -> root.leftPadding = navigationBarHeight |
|
|
|
|
|
|
|
2 -> root.rightPadding = navigationBarHeight |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
if (!LocalConfig.readMenuHelpVersionIsLast) { |
|
|
|
if (!LocalConfig.readMenuHelpVersionIsLast) { |
|
|
|