pull/1744/head
kunfei 3 years ago
parent 3424e52354
commit eb8bbf5884
  1. 6
      app/src/main/java/io/legado/app/help/IntentHelp.kt
  2. 2
      app/src/main/java/io/legado/app/ui/book/read/config/ReadAloudConfigDialog.kt
  3. 2
      app/src/main/res/values-es-rES/strings.xml
  4. 2
      app/src/main/res/values-ja-rJP/strings.xml
  5. 2
      app/src/main/res/values-pt-rBR/strings.xml
  6. 2
      app/src/main/res/values-zh-rHK/strings.xml
  7. 2
      app/src/main/res/values-zh-rTW/strings.xml
  8. 2
      app/src/main/res/values-zh/strings.xml
  9. 2
      app/src/main/res/values/strings.xml
  10. 7
      app/src/main/res/xml/pref_config_aloud.xml

@ -24,15 +24,15 @@ object IntentHelp {
return intent
}
fun toTTSSetting(context: Context) {
fun openTTSSetting() {
//跳转到文字转语音设置界面
kotlin.runCatching {
val intent = Intent()
intent.action = "com.android.settings.TTS_SETTINGS"
intent.flags = Intent.FLAG_ACTIVITY_NEW_TASK
context.startActivity(intent)
appCtx.startActivity(intent)
}.onFailure {
context.toastOnUi(R.string.tip_cannot_jump_setting_page)
appCtx.toastOnUi(R.string.tip_cannot_jump_setting_page)
}
}

@ -14,6 +14,7 @@ import io.legado.app.base.BasePreferenceFragment
import io.legado.app.constant.EventBus
import io.legado.app.constant.PreferKey
import io.legado.app.data.appDb
import io.legado.app.help.IntentHelp
import io.legado.app.lib.dialogs.SelectItem
import io.legado.app.lib.theme.backgroundColor
import io.legado.app.lib.theme.primaryColor
@ -92,6 +93,7 @@ class ReadAloudConfigDialog : DialogFragment() {
override fun onPreferenceTreeClick(preference: Preference): Boolean {
when (preference.key) {
PreferKey.ttsEngine -> showDialogFragment(SpeakEngineDialog(this))
"sysTtsConfig" -> IntentHelp.openTTSSetting()
}
return super.onPreferenceTreeClick(preference)
}

@ -962,5 +962,7 @@
<string name="cover_rule">封面规则</string>
<string name="cover_rule_summary">进入详情页时使用封面规则重新获取封面</string>
<string name="scroll_to_dur_source">定位到当前书源</string>
<string name="sys_tts_config">系统tts设置</string>
<string name="sys_tts_config_summary">打开系统tts设置界面</string>
<!-- string end -->
</resources>

@ -965,5 +965,7 @@
<string name="cover_rule">封面规则</string>
<string name="cover_rule_summary">进入详情页时使用封面规则重新获取封面</string>
<string name="scroll_to_dur_source">定位到当前书源</string>
<string name="sys_tts_config">系统tts设置</string>
<string name="sys_tts_config_summary">打开系统tts设置界面</string>
<!-- string end -->
</resources>

@ -965,5 +965,7 @@
<string name="cover_rule">封面规则</string>
<string name="cover_rule_summary">进入详情页时使用封面规则重新获取封面</string>
<string name="scroll_to_dur_source">定位到当前书源</string>
<string name="sys_tts_config">系统tts设置</string>
<string name="sys_tts_config_summary">打开系统tts设置界面</string>
<!-- string end -->
</resources>

@ -962,5 +962,7 @@
<string name="cover_rule">封面规则</string>
<string name="cover_rule_summary">进入详情页时使用封面规则重新获取封面</string>
<string name="scroll_to_dur_source">定位到当前书源</string>
<string name="sys_tts_config">系统tts设置</string>
<string name="sys_tts_config_summary">打开系统tts设置界面</string>
<!-- string end -->
</resources>

@ -964,5 +964,7 @@
<string name="cover_rule">封面規則</string>
<string name="cover_rule_summary">進入詳情頁時使用封面規則重新獲取封面</string>
<string name="scroll_to_dur_source">定位到目前書源</string>
<string name="sys_tts_config">系统tts设置</string>
<string name="sys_tts_config_summary">打开系统tts设置界面</string>
<!-- string end -->
</resources>

@ -964,5 +964,7 @@
<string name="cover_rule">封面规则</string>
<string name="cover_rule_summary">进入详情页时使用封面规则重新获取封面</string>
<string name="scroll_to_dur_source">定位到当前书源</string>
<string name="sys_tts_config">系统tts设置</string>
<string name="sys_tts_config_summary">打开系统tts设置界面</string>
<!-- string end -->
</resources>

@ -965,5 +965,7 @@
<string name="cover_rule">封面规则</string>
<string name="cover_rule_summary">进入详情页时使用封面规则重新获取封面</string>
<string name="scroll_to_dur_source">定位到当前书源</string>
<string name="sys_tts_config">系统tts设置</string>
<string name="sys_tts_config_summary">打开系统tts设置界面</string>
<!-- string end -->
</resources>

@ -23,12 +23,17 @@
app:iconSpaceReserved="false" />
<io.legado.app.ui.widget.prefs.Preference
android:defaultValue="false"
android:title="@string/speak_engine"
android:summary="TTS"
android:key="appTtsEngine"
app:iconSpaceReserved="false" />
<io.legado.app.ui.widget.prefs.Preference
android:title="@string/sys_tts_config"
android:summary="@string/sys_tts_config_summary"
android:key="sysTtsConfig"
app:iconSpaceReserved="false" />
</io.legado.app.ui.widget.prefs.PreferenceCategory>
</androidx.preference.PreferenceScreen>
Loading…
Cancel
Save