【发布时间】:2015-07-05 13:28:38
【问题描述】:
我有一个如下所示的 EditText
<EditText
android:id="@+id/extUsername"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:contentDescription="Username field"
android:hint="Username" />
我想让 TalkBack 显示“用户名字段”,但它显示的是“用户名”。它忽略 contentDescription。
不要告诉我删除提示或内容描述。我需要两个都用。
任何建议将不胜感激。
【问题讨论】:
-
不要在编辑字段上设置内容描述。不要在内容描述中包含组件类型。如果需要,可访问性服务会处理此问题。只需设置
android:hint或使用android:labelFor如果您有单独的标签。
标签: android accessibility hint talkback