diff --git a/app/src/main/java/io/legado/app/ui/book/read/config/AutoReadDialog.kt b/app/src/main/java/io/legado/app/ui/book/read/config/AutoReadDialog.kt
index 8b67a2394..610fa3dde 100644
--- a/app/src/main/java/io/legado/app/ui/book/read/config/AutoReadDialog.kt
+++ b/app/src/main/java/io/legado/app/ui/book/read/config/AutoReadDialog.kt
@@ -11,9 +11,11 @@ import io.legado.app.R
import io.legado.app.base.BaseDialogFragment
import io.legado.app.help.ReadBookConfig
import io.legado.app.lib.theme.bottomBackground
+import io.legado.app.lib.theme.getPrimaryTextColor
import io.legado.app.service.BaseReadAloudService
import io.legado.app.service.help.ReadAloud
import io.legado.app.ui.book.read.Help
+import io.legado.app.utils.ColorUtils
import kotlinx.android.synthetic.main.dialog_auto_read.*
import org.jetbrains.anko.sdk27.listeners.onClick
@@ -48,20 +50,36 @@ class AutoReadDialog : BaseDialogFragment() {
}
override fun onFragmentCreated(view: View, savedInstanceState: Bundle?) {
- root_view.setBackgroundColor(requireContext().bottomBackground)
+ val bg = requireContext().bottomBackground
+ val isLight = ColorUtils.isColorLight(bg)
+ val textColor = requireContext().getPrimaryTextColor(isLight)
+ root_view.setBackgroundColor(bg)
+ tv_read_speed_title.setTextColor(textColor)
+ tv_read_speed.setTextColor(textColor)
+ iv_catalog.setColorFilter(textColor)
+ tv_catalog.setTextColor(textColor)
+ iv_main_menu.setColorFilter(textColor)
+ tv_main_menu.setTextColor(textColor)
+ iv_auto_page_stop.setColorFilter(textColor)
+ tv_auto_page_stop.setTextColor(textColor)
+ iv_setting.setColorFilter(textColor)
+ tv_setting.setTextColor(textColor)
initOnChange()
initData()
initEvent()
}
private fun initData() {
- seek_auto_read.progress =
- if (ReadBookConfig.autoReadSpeed < 10) 10 else ReadBookConfig.autoReadSpeed
+ val speed = if (ReadBookConfig.autoReadSpeed < 10) 10 else ReadBookConfig.autoReadSpeed
+ tv_read_speed.text = String.format("%ds", speed)
+ seek_auto_read.progress = speed
}
private fun initOnChange() {
seek_auto_read.setOnSeekBarChangeListener(object : SeekBar.OnSeekBarChangeListener {
override fun onProgressChanged(seekBar: SeekBar, progress: Int, fromUser: Boolean) {
+ val speed = if (progress < 10) 10 else progress
+ tv_read_speed.text = String.format("%ds", speed)
}
override fun onStartTrackingTouch(seekBar: SeekBar) = Unit
diff --git a/app/src/main/java/io/legado/app/ui/book/read/config/ReadStyleDialog.kt b/app/src/main/java/io/legado/app/ui/book/read/config/ReadStyleDialog.kt
index 6f8ac5e0f..50824ff50 100644
--- a/app/src/main/java/io/legado/app/ui/book/read/config/ReadStyleDialog.kt
+++ b/app/src/main/java/io/legado/app/ui/book/read/config/ReadStyleDialog.kt
@@ -74,12 +74,13 @@ class ReadStyleDialog : BaseDialogFragment(), FontSelectDialog.CallBack {
}
private fun initView() {
- val isLight = ColorUtils.isColorLight(requireContext().bottomBackground)
+ val bg = requireContext().bottomBackground
+ val isLight = ColorUtils.isColorLight(bg)
val textColor = requireContext().getPrimaryTextColor(isLight)
tv_page_anim.setTextColor(textColor)
tv_bg_ts.setTextColor(textColor)
tv_share_layout.setTextColor(textColor)
- root_view.setBackgroundColor(requireContext().bottomBackground)
+ root_view.setBackgroundColor(bg)
dsb_text_size.valueFormat = {
(it + 5).toString()
}
diff --git a/app/src/main/res/layout/dialog_auto_read.xml b/app/src/main/res/layout/dialog_auto_read.xml
index 21c5c2c4f..a8da725b4 100644
--- a/app/src/main/res/layout/dialog_auto_read.xml
+++ b/app/src/main/res/layout/dialog_auto_read.xml
@@ -26,6 +26,7 @@
android:padding="8dp">
+
+