优化
This commit is contained in:
@@ -110,48 +110,54 @@ class TipConfigDialog : BaseDialogFragment(R.layout.dialog_tip_config) {
|
|||||||
}
|
}
|
||||||
llHeaderLeft.setOnClickListener {
|
llHeaderLeft.setOnClickListener {
|
||||||
context?.selector(items = ReadTipConfig.tipNames) { _, i ->
|
context?.selector(items = ReadTipConfig.tipNames) { _, i ->
|
||||||
clearRepeat(i)
|
val tipValue = ReadTipConfig.tipValues[i]
|
||||||
ReadTipConfig.tipHeaderLeft = ReadTipConfig.tipValues[i]
|
clearRepeat(tipValue)
|
||||||
|
ReadTipConfig.tipHeaderLeft = tipValue
|
||||||
tvHeaderLeft.text = ReadTipConfig.tipNames[i]
|
tvHeaderLeft.text = ReadTipConfig.tipNames[i]
|
||||||
postEvent(EventBus.UP_CONFIG, true)
|
postEvent(EventBus.UP_CONFIG, true)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
llHeaderMiddle.setOnClickListener {
|
llHeaderMiddle.setOnClickListener {
|
||||||
context?.selector(items = ReadTipConfig.tipNames) { _, i ->
|
context?.selector(items = ReadTipConfig.tipNames) { _, i ->
|
||||||
clearRepeat(i)
|
val tipValue = ReadTipConfig.tipValues[i]
|
||||||
ReadTipConfig.tipHeaderMiddle = ReadTipConfig.tipValues[i]
|
clearRepeat(tipValue)
|
||||||
|
ReadTipConfig.tipHeaderMiddle = tipValue
|
||||||
tvHeaderMiddle.text = ReadTipConfig.tipNames[i]
|
tvHeaderMiddle.text = ReadTipConfig.tipNames[i]
|
||||||
postEvent(EventBus.UP_CONFIG, true)
|
postEvent(EventBus.UP_CONFIG, true)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
llHeaderRight.setOnClickListener {
|
llHeaderRight.setOnClickListener {
|
||||||
context?.selector(items = ReadTipConfig.tipNames) { _, i ->
|
context?.selector(items = ReadTipConfig.tipNames) { _, i ->
|
||||||
clearRepeat(i)
|
val tipValue = ReadTipConfig.tipValues[i]
|
||||||
ReadTipConfig.tipHeaderRight = ReadTipConfig.tipValues[i]
|
clearRepeat(tipValue)
|
||||||
|
ReadTipConfig.tipHeaderRight = tipValue
|
||||||
tvHeaderRight.text = ReadTipConfig.tipNames[i]
|
tvHeaderRight.text = ReadTipConfig.tipNames[i]
|
||||||
postEvent(EventBus.UP_CONFIG, true)
|
postEvent(EventBus.UP_CONFIG, true)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
llFooterLeft.setOnClickListener {
|
llFooterLeft.setOnClickListener {
|
||||||
context?.selector(items = ReadTipConfig.tipNames) { _, i ->
|
context?.selector(items = ReadTipConfig.tipNames) { _, i ->
|
||||||
clearRepeat(i)
|
val tipValue = ReadTipConfig.tipValues[i]
|
||||||
ReadTipConfig.tipFooterLeft = ReadTipConfig.tipValues[i]
|
clearRepeat(tipValue)
|
||||||
|
ReadTipConfig.tipFooterLeft = tipValue
|
||||||
tvFooterLeft.text = ReadTipConfig.tipNames[i]
|
tvFooterLeft.text = ReadTipConfig.tipNames[i]
|
||||||
postEvent(EventBus.UP_CONFIG, true)
|
postEvent(EventBus.UP_CONFIG, true)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
llFooterMiddle.setOnClickListener {
|
llFooterMiddle.setOnClickListener {
|
||||||
context?.selector(items = ReadTipConfig.tipNames) { _, i ->
|
context?.selector(items = ReadTipConfig.tipNames) { _, i ->
|
||||||
clearRepeat(i)
|
val tipValue = ReadTipConfig.tipValues[i]
|
||||||
ReadTipConfig.tipFooterMiddle = ReadTipConfig.tipValues[i]
|
clearRepeat(tipValue)
|
||||||
|
ReadTipConfig.tipFooterMiddle = tipValue
|
||||||
tvFooterMiddle.text = ReadTipConfig.tipNames[i]
|
tvFooterMiddle.text = ReadTipConfig.tipNames[i]
|
||||||
postEvent(EventBus.UP_CONFIG, true)
|
postEvent(EventBus.UP_CONFIG, true)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
llFooterRight.setOnClickListener {
|
llFooterRight.setOnClickListener {
|
||||||
context?.selector(items = ReadTipConfig.tipNames) { _, i ->
|
context?.selector(items = ReadTipConfig.tipNames) { _, i ->
|
||||||
clearRepeat(i)
|
val tipValue = ReadTipConfig.tipValues[i]
|
||||||
ReadTipConfig.tipFooterRight = ReadTipConfig.tipValues[i]
|
clearRepeat(tipValue)
|
||||||
|
ReadTipConfig.tipFooterRight = tipValue
|
||||||
tvFooterRight.text = ReadTipConfig.tipNames[i]
|
tvFooterRight.text = ReadTipConfig.tipNames[i]
|
||||||
postEvent(EventBus.UP_CONFIG, true)
|
postEvent(EventBus.UP_CONFIG, true)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user