From 31d1872b7628d1660c71f63f9417178ae2a5fbdd Mon Sep 17 00:00:00 2001 From: kunfei Date: Fri, 6 Sep 2019 22:27:12 +0800 Subject: [PATCH] up --- app/src/main/java/io/legado/app/ui/readbook/ReadMenu.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/readbook/ReadMenu.kt b/app/src/main/java/io/legado/app/ui/readbook/ReadMenu.kt index d5a8a97a1..62a8a834e 100644 --- a/app/src/main/java/io/legado/app/ui/readbook/ReadMenu.kt +++ b/app/src/main/java/io/legado/app/ui/readbook/ReadMenu.kt @@ -47,11 +47,11 @@ class ReadMenu : FrameLayout { vw_bg.onClick { } vwNavigationBar.onClick { } seek_brightness.progress = context.getPrefInt("brightness", 100) - upBrightness() + upBrightnessState() bindEvent() } - private fun upBrightness() { + private fun upBrightnessState() { if (brightnessAuto()) { iv_brightness_auto.setColorFilter(context.accentColor) seek_brightness.isEnabled = false @@ -59,7 +59,6 @@ class ReadMenu : FrameLayout { iv_brightness_auto.setColorFilter(context.buttonDisabledColor) seek_brightness.isEnabled = true } - callBack?.setScreenBrightness(context.getPrefInt("brightness", 100)) } fun runMenuIn() { @@ -93,7 +92,8 @@ class ReadMenu : FrameLayout { "brightnessAuto", !brightnessAuto() ) - upBrightness() + upBrightnessState() + callBack?.setScreenBrightness(context.getPrefInt("brightness", 100)) } seek_brightness.setOnSeekBarChangeListener(object : SeekBar.OnSeekBarChangeListener { override fun onProgressChanged(seekBar: SeekBar?, progress: Int, fromUser: Boolean) {