|
|
@ -81,8 +81,8 @@ class ReadAloudDialog : BaseDialogFragment() { |
|
|
|
tvSetting.setTextColor(textColor) |
|
|
|
tvSetting.setTextColor(textColor) |
|
|
|
cbTtsFollowSys.setTextColor(textColor) |
|
|
|
cbTtsFollowSys.setTextColor(textColor) |
|
|
|
} |
|
|
|
} |
|
|
|
initOnChange() |
|
|
|
|
|
|
|
initData() |
|
|
|
initData() |
|
|
|
|
|
|
|
initOnChange() |
|
|
|
initEvent() |
|
|
|
initEvent() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -96,13 +96,11 @@ class ReadAloudDialog : BaseDialogFragment() { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private fun initOnChange() = with(binding) { |
|
|
|
private fun initOnChange() = with(binding) { |
|
|
|
cbTtsFollowSys.setOnCheckedChangeListener { buttonView, isChecked -> |
|
|
|
cbTtsFollowSys.setOnCheckedChangeListener { _, isChecked -> |
|
|
|
if (buttonView.isPressed) { |
|
|
|
|
|
|
|
requireContext().putPrefBoolean("ttsFollowSys", isChecked) |
|
|
|
requireContext().putPrefBoolean("ttsFollowSys", isChecked) |
|
|
|
seekTtsSpeechRate.isEnabled = !isChecked |
|
|
|
seekTtsSpeechRate.isEnabled = !isChecked |
|
|
|
upTtsSpeechRate() |
|
|
|
upTtsSpeechRate() |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
seekTtsSpeechRate.setOnSeekBarChangeListener(object : SeekBarChangeListener { |
|
|
|
seekTtsSpeechRate.setOnSeekBarChangeListener(object : SeekBarChangeListener { |
|
|
|
|
|
|
|
|
|
|
|
override fun onStopTrackingTouch(seekBar: SeekBar) { |
|
|
|
override fun onStopTrackingTouch(seekBar: SeekBar) { |
|
|
|