问题
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