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())