|
|
|
@ -85,7 +85,7 @@ class ReadAloudDialog : BaseDialogFragment(R.layout.dialog_read_aloud) { |
|
|
|
|
upTimerText(BaseReadAloudService.timeMinute) |
|
|
|
|
seekTimer.progress = BaseReadAloudService.timeMinute |
|
|
|
|
cbTtsFollowSys.isChecked = requireContext().getPrefBoolean("ttsFollowSys", true) |
|
|
|
|
seekTtsSpeechRate.isEnabled = !cbTtsFollowSys.isChecked |
|
|
|
|
upTtsSpeechRateEnabled(!cbTtsFollowSys.isChecked) |
|
|
|
|
upSeekTimer() |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -110,7 +110,7 @@ class ReadAloudDialog : BaseDialogFragment(R.layout.dialog_read_aloud) { |
|
|
|
|
llToBackstage.setOnClickListener { callBack?.finish() } |
|
|
|
|
cbTtsFollowSys.setOnCheckedChangeListener { _, isChecked -> |
|
|
|
|
AppConfig.ttsFlowSys = isChecked |
|
|
|
|
seekTtsSpeechRate.isEnabled = !isChecked |
|
|
|
|
upTtsSpeechRateEnabled(!isChecked) |
|
|
|
|
upTtsSpeechRate() |
|
|
|
|
} |
|
|
|
|
ivTtsSpeechReduce.setOnClickListener { |
|
|
|
@ -142,6 +142,14 @@ class ReadAloudDialog : BaseDialogFragment(R.layout.dialog_read_aloud) { |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private fun upTtsSpeechRateEnabled(enabled: Boolean) { |
|
|
|
|
binding.run { |
|
|
|
|
seekTtsSpeechRate.isEnabled = enabled |
|
|
|
|
ivTtsSpeechReduce.isEnabled = enabled |
|
|
|
|
ivTtsSpeechAdd.isEnabled = enabled |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private fun upPlayState() { |
|
|
|
|
if (!BaseReadAloudService.pause) { |
|
|
|
|
binding.ivPlayPause.setImageResource(R.drawable.ic_pause_24dp) |
|
|
|
|