动态更改对讲语言? [英] Change Talkback language dynamically?

查看:142
本文介绍了动态更改对讲语言?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个带有翻译测验的应用程序,我想让盲人可以使用它。问题是,例如当我关注西班牙语句子时,Talkback会用英语阅读它。

I have an application with a translation quiz and I want to make it accessible to blind people. The problem is that when I focus on a Spanish sentence (for example), Talkback reads it in English. Is there any way to trigger the Spanish TTS dynamically in Java?

谢谢

推荐答案

是的,现在有!

您必须将字符串包装在 LocaleSpan (最小sdk 17)和最新版本的TalkBack可以即时切换语言。

You have to wrap the string in a LocaleSpan (min sdk 17) and the latest version of TalkBack can switch language on the fly.

  • What's new in Android Accessibility 2017 - https://youtu.be/h5rRNXzy1xo?t=11m
  • https://developer.android.com/reference/android/text/style/LocaleSpan.html

这篇关于动态更改对讲语言?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆