|
|
@ -93,7 +93,7 @@ class TipConfigDialog : BaseDialogFragment() { |
|
|
|
} |
|
|
|
} |
|
|
|
llHeaderShow.setOnClickListener { |
|
|
|
llHeaderShow.setOnClickListener { |
|
|
|
val headerModes = ReadTipConfig.getHeaderModes(requireContext()) |
|
|
|
val headerModes = ReadTipConfig.getHeaderModes(requireContext()) |
|
|
|
selector(items = headerModes.values.toList()) { _, i -> |
|
|
|
context?.selector(items = headerModes.values.toList()) { _, i -> |
|
|
|
ReadTipConfig.headerMode = headerModes.keys.toList()[i] |
|
|
|
ReadTipConfig.headerMode = headerModes.keys.toList()[i] |
|
|
|
tvHeaderShow.text = headerModes[ReadTipConfig.headerMode] |
|
|
|
tvHeaderShow.text = headerModes[ReadTipConfig.headerMode] |
|
|
|
postEvent(EventBus.UP_CONFIG, true) |
|
|
|
postEvent(EventBus.UP_CONFIG, true) |
|
|
@ -101,14 +101,14 @@ class TipConfigDialog : BaseDialogFragment() { |
|
|
|
} |
|
|
|
} |
|
|
|
llFooterShow.setOnClickListener { |
|
|
|
llFooterShow.setOnClickListener { |
|
|
|
val footerModes = ReadTipConfig.getFooterModes(requireContext()) |
|
|
|
val footerModes = ReadTipConfig.getFooterModes(requireContext()) |
|
|
|
selector(items = footerModes.values.toList()) { _, i -> |
|
|
|
context?.selector(items = footerModes.values.toList()) { _, i -> |
|
|
|
ReadTipConfig.footerMode = footerModes.keys.toList()[i] |
|
|
|
ReadTipConfig.footerMode = footerModes.keys.toList()[i] |
|
|
|
tvFooterShow.text = footerModes[ReadTipConfig.footerMode] |
|
|
|
tvFooterShow.text = footerModes[ReadTipConfig.footerMode] |
|
|
|
postEvent(EventBus.UP_CONFIG, true) |
|
|
|
postEvent(EventBus.UP_CONFIG, true) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
llHeaderLeft.setOnClickListener { |
|
|
|
llHeaderLeft.setOnClickListener { |
|
|
|
selector(items = ReadTipConfig.tips) { _, i -> |
|
|
|
context?.selector(items = ReadTipConfig.tips) { _, i -> |
|
|
|
clearRepeat(i) |
|
|
|
clearRepeat(i) |
|
|
|
ReadTipConfig.tipHeaderLeft = i |
|
|
|
ReadTipConfig.tipHeaderLeft = i |
|
|
|
tvHeaderLeft.text = ReadTipConfig.tips[i] |
|
|
|
tvHeaderLeft.text = ReadTipConfig.tips[i] |
|
|
@ -116,7 +116,7 @@ class TipConfigDialog : BaseDialogFragment() { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
llHeaderMiddle.setOnClickListener { |
|
|
|
llHeaderMiddle.setOnClickListener { |
|
|
|
selector(items = ReadTipConfig.tips) { _, i -> |
|
|
|
context?.selector(items = ReadTipConfig.tips) { _, i -> |
|
|
|
clearRepeat(i) |
|
|
|
clearRepeat(i) |
|
|
|
ReadTipConfig.tipHeaderMiddle = i |
|
|
|
ReadTipConfig.tipHeaderMiddle = i |
|
|
|
tvHeaderMiddle.text = ReadTipConfig.tips[i] |
|
|
|
tvHeaderMiddle.text = ReadTipConfig.tips[i] |
|
|
@ -124,7 +124,7 @@ class TipConfigDialog : BaseDialogFragment() { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
llHeaderRight.setOnClickListener { |
|
|
|
llHeaderRight.setOnClickListener { |
|
|
|
selector(items = ReadTipConfig.tips) { _, i -> |
|
|
|
context?.selector(items = ReadTipConfig.tips) { _, i -> |
|
|
|
clearRepeat(i) |
|
|
|
clearRepeat(i) |
|
|
|
ReadTipConfig.tipHeaderRight = i |
|
|
|
ReadTipConfig.tipHeaderRight = i |
|
|
|
tvHeaderRight.text = ReadTipConfig.tips[i] |
|
|
|
tvHeaderRight.text = ReadTipConfig.tips[i] |
|
|
@ -132,7 +132,7 @@ class TipConfigDialog : BaseDialogFragment() { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
llFooterLeft.setOnClickListener { |
|
|
|
llFooterLeft.setOnClickListener { |
|
|
|
selector(items = ReadTipConfig.tips) { _, i -> |
|
|
|
context?.selector(items = ReadTipConfig.tips) { _, i -> |
|
|
|
clearRepeat(i) |
|
|
|
clearRepeat(i) |
|
|
|
ReadTipConfig.tipFooterLeft = i |
|
|
|
ReadTipConfig.tipFooterLeft = i |
|
|
|
tvFooterLeft.text = ReadTipConfig.tips[i] |
|
|
|
tvFooterLeft.text = ReadTipConfig.tips[i] |
|
|
@ -140,7 +140,7 @@ class TipConfigDialog : BaseDialogFragment() { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
llFooterMiddle.setOnClickListener { |
|
|
|
llFooterMiddle.setOnClickListener { |
|
|
|
selector(items = ReadTipConfig.tips) { _, i -> |
|
|
|
context?.selector(items = ReadTipConfig.tips) { _, i -> |
|
|
|
clearRepeat(i) |
|
|
|
clearRepeat(i) |
|
|
|
ReadTipConfig.tipFooterMiddle = i |
|
|
|
ReadTipConfig.tipFooterMiddle = i |
|
|
|
tvFooterMiddle.text = ReadTipConfig.tips[i] |
|
|
|
tvFooterMiddle.text = ReadTipConfig.tips[i] |
|
|
@ -148,7 +148,7 @@ class TipConfigDialog : BaseDialogFragment() { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
llFooterRight.setOnClickListener { |
|
|
|
llFooterRight.setOnClickListener { |
|
|
|
selector(items = ReadTipConfig.tips) { _, i -> |
|
|
|
context?.selector(items = ReadTipConfig.tips) { _, i -> |
|
|
|
clearRepeat(i) |
|
|
|
clearRepeat(i) |
|
|
|
ReadTipConfig.tipFooterRight = i |
|
|
|
ReadTipConfig.tipFooterRight = i |
|
|
|
tvFooterRight.text = ReadTipConfig.tips[i] |
|
|
|
tvFooterRight.text = ReadTipConfig.tips[i] |
|
|
@ -156,7 +156,7 @@ class TipConfigDialog : BaseDialogFragment() { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
llTipColor.setOnClickListener { |
|
|
|
llTipColor.setOnClickListener { |
|
|
|
selector(items = arrayListOf("跟随正文", "自定义")) { _, i -> |
|
|
|
context?.selector(items = arrayListOf("跟随正文", "自定义")) { _, i -> |
|
|
|
when (i) { |
|
|
|
when (i) { |
|
|
|
0 -> { |
|
|
|
0 -> { |
|
|
|
ReadTipConfig.tipColor = 0 |
|
|
|
ReadTipConfig.tipColor = 0 |
|
|
|