From 3dfc060d64af63b97a385b68b7abbcdb7dcdb3ea Mon Sep 17 00:00:00 2001 From: kunfei Date: Sat, 7 Sep 2019 16:48:39 +0800 Subject: [PATCH] up --- .../io/legado/app/ui/readbook/config/BgTextConfigDialog.kt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/src/main/java/io/legado/app/ui/readbook/config/BgTextConfigDialog.kt b/app/src/main/java/io/legado/app/ui/readbook/config/BgTextConfigDialog.kt index bd67d8352..9ecde4b0e 100644 --- a/app/src/main/java/io/legado/app/ui/readbook/config/BgTextConfigDialog.kt +++ b/app/src/main/java/io/legado/app/ui/readbook/config/BgTextConfigDialog.kt @@ -30,6 +30,7 @@ import io.legado.app.utils.getCompatColor import io.legado.app.utils.postEvent import kotlinx.android.synthetic.main.dialog_read_bg_text.* import kotlinx.android.synthetic.main.item_bg_image.view.* +import org.jetbrains.anko.sdk27.listeners.onCheckedChange import org.jetbrains.anko.sdk27.listeners.onClick class BgTextConfigDialog : DialogFragment() { @@ -97,6 +98,11 @@ class BgTextConfigDialog : DialogFragment() { } private fun initView() = with(ReadBookConfig.getConfig()) { + sw_dark_status_icon.onCheckedChange { buttonView, isChecked -> + if (buttonView?.isPressed == true) { + setStatusIconDark(isChecked) + } + } tv_text_color.onClick { ColorPickerDialog.newBuilder() .setColor(textColor())