Change Talkback language dynamically?

萝らか妹 提交于 2019-12-11 07:56:34

问题


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?

Thank you


回答1:


Yes there is now!

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


来源:https://stackoverflow.com/questions/44346134/change-talkback-language-dynamically

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!