|
|
@ -85,8 +85,10 @@ class ReadMenu @JvmOverloads constructor( |
|
|
|
vwBg.setOnClickListener(null) |
|
|
|
vwBg.setOnClickListener(null) |
|
|
|
vwNavigationBar.setOnClickListener(null) |
|
|
|
vwNavigationBar.setOnClickListener(null) |
|
|
|
llBrightness.setOnClickListener(null) |
|
|
|
llBrightness.setOnClickListener(null) |
|
|
|
|
|
|
|
seekBrightness.post { |
|
|
|
seekBrightness.progress = AppConfig.readBrightness |
|
|
|
seekBrightness.progress = AppConfig.readBrightness |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
fun upBrightnessState() { |
|
|
|
fun upBrightnessState() { |
|
|
|
if (brightnessAuto()) { |
|
|
|
if (brightnessAuto()) { |
|
|
@ -152,8 +154,10 @@ class ReadMenu @JvmOverloads constructor( |
|
|
|
seekBrightness.setOnSeekBarChangeListener(object : SeekBarChangeListener { |
|
|
|
seekBrightness.setOnSeekBarChangeListener(object : SeekBarChangeListener { |
|
|
|
|
|
|
|
|
|
|
|
override fun onProgressChanged(seekBar: SeekBar, progress: Int, fromUser: Boolean) { |
|
|
|
override fun onProgressChanged(seekBar: SeekBar, progress: Int, fromUser: Boolean) { |
|
|
|
|
|
|
|
if (fromUser) { |
|
|
|
setScreenBrightness(progress) |
|
|
|
setScreenBrightness(progress) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
override fun onStopTrackingTouch(seekBar: SeekBar) { |
|
|
|
override fun onStopTrackingTouch(seekBar: SeekBar) { |
|
|
|
AppConfig.readBrightness = seekBar.progress |
|
|
|
AppConfig.readBrightness = seekBar.progress |
|
|
|