From 3d971657f3b9ca198f246f4a8c4391fb25f0bdca Mon Sep 17 00:00:00 2001 From: kunfei Date: Sun, 19 Apr 2020 16:13:36 +0800 Subject: [PATCH] feat: tipConfig --- .../io/legado/app/ui/book/read/config/TipConfigDialog.kt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/src/main/java/io/legado/app/ui/book/read/config/TipConfigDialog.kt b/app/src/main/java/io/legado/app/ui/book/read/config/TipConfigDialog.kt index 4bcb355f3..280142c9f 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/config/TipConfigDialog.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/config/TipConfigDialog.kt @@ -7,9 +7,11 @@ import android.view.View import android.view.ViewGroup import io.legado.app.R import io.legado.app.base.BaseDialogFragment +import io.legado.app.constant.EventBus import io.legado.app.help.ReadTipConfig import io.legado.app.lib.dialogs.selector import io.legado.app.ui.book.read.Help +import io.legado.app.utils.postEvent import kotlinx.android.synthetic.main.dialog_tip_config.* import org.jetbrains.anko.sdk27.listeners.onClick @@ -57,36 +59,42 @@ class TipConfigDialog : BaseDialogFragment() { selector(items = ReadTipConfig.tipArray.toList()) { _, i -> ReadTipConfig.tipHeaderLeft = i tv_header_left.text = ReadTipConfig.tipArray[i] + postEvent(EventBus.UP_CONFIG, true) } } tv_header_middle.onClick { selector(items = ReadTipConfig.tipArray.toList()) { _, i -> ReadTipConfig.tipHeaderMiddle = i tv_header_middle.text = ReadTipConfig.tipArray[i] + postEvent(EventBus.UP_CONFIG, true) } } tv_header_right.onClick { selector(items = ReadTipConfig.tipArray.toList()) { _, i -> ReadTipConfig.tipHeaderRight = i tv_header_right.text = ReadTipConfig.tipArray[i] + postEvent(EventBus.UP_CONFIG, true) } } tv_footer_left.onClick { selector(items = ReadTipConfig.tipArray.toList()) { _, i -> ReadTipConfig.tipFooterLeft = i tv_footer_left.text = ReadTipConfig.tipArray[i] + postEvent(EventBus.UP_CONFIG, true) } } tv_footer_middle.onClick { selector(items = ReadTipConfig.tipArray.toList()) { _, i -> ReadTipConfig.tipFooterMiddle = i tv_footer_middle.text = ReadTipConfig.tipArray[i] + postEvent(EventBus.UP_CONFIG, true) } } tv_footer_right.onClick { selector(items = ReadTipConfig.tipArray.toList()) { _, i -> ReadTipConfig.tipFooterRight = i tv_footer_right.text = ReadTipConfig.tipArray[i] + postEvent(EventBus.UP_CONFIG, true) } } }