简体   繁体   English

具有不同语言环境的TextView的Android可访问性

[英]Android accessibility for TextView with different locales

In my app, I have android:text="@string/myText" set for a TextView. 在我的应用中,我为TextView设置了android:text =“ @ string / myText”。 This myText is picked from strings.xml based on the localization(English/German). 根据本地化(英语/德语)从strings.xml中选取此myText。
For English: SETTINGS 对于英语:SETTINGS
For German: EINSTELLUNGEN 对于德语:EINSTELLUNGEN

With TalkBack on, Android announces SETTINGS (locale is English) but it does not announce EINSTELLUNGEN (locale is German). 启用“话语提示”后,Android会宣布SETTINGS(语言环境为英语),但不会宣布EINSTELLUNGEN(语言环境为德语)。
What would be the reason ? 请问是什么原因?
Does CAPITAL LETTERS of the text have anything to do with this ? 文本的大写字母与此有关吗?

Below is my TextView in the xml: 下面是我在xml中的T​​extView:

<TextView
android:id="@+id/settings_text"
android:layout_width="wrap_content"
android:layout_height="48dp"
android:gravity="center_vertical"
android:text="@string/settings"
android:textColor="@color/st_white"
android:textStyle="bold"
android:textSize="15sp"/>


The "settings" string is present in two different strings.xml files for English(default) and German version. 英文(默认)和德语版本的两个不同的strings.xml文件中存在“设置”字符串。
English: values/strings.xml 英文:values / strings.xml
<string name="settings">SETTINGS</string>

German: values-de/strings.xml 德语:values-de / strings.xml
<string name="settings">EINSTELLUNGEN</string>

I can see the display if "Display speech output" setting is turned on(TalkBack Settings -> Developer Settings) but could not hear the same. 如果“显示语音输出”设置已打开(“话语提示设置”->“开发人员设置”),但无法听到相同的声音,我可以看到显示器。

The issue has been resolved by updating Google Talkback and Google Text-to-Speech from the Playstore. 该问题已通过更新Playstore中的Google TalkbackGoogle Text-to-Speech解决。
After updating both, I have to turn Talkback OFF (if already ON), change the device locale (in my case to Deutsch for German) and then turn ON Talkback. 两者都更新后,我必须关闭对讲功能(如果已经打开),更改设备区域设置(在我的情况下,将语言环境更改为Deutsch,对于德语),然后再打开对讲功能。 This will automatically download updates for the locale text-to-speech. 这将自动下载语言文字转换为语音的更新。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM