在xml文件中声明EditText时,我收到了如下警告
没有标签视图指向带有android:labelFor="@+id/@+id/start“属性的文本字段
EditText代码是
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/start"
android:hint="@string/edit_message" />发布于 2014-04-27 07:52:37
我也不知道这个错误信息是想告诉我做什么!
谢天谢地,我找到了一个解释:http://thecodeiscompiling.blogspot.com/2013/12/android-labelfor-waning-fix.html
警告告诉您,EditText字段没有可在打开可访问性时读取给用户的TextView,因为您还没有使用android:labelFor属性指定该字段。
发布于 2013-10-07 17:57:51
在您的editText中使用id,如下面所示。
android:id="@+id/editText1"然后,如果您想设置labelFor,那么使用
android:labelFor="@id/editText1"发布于 2013-10-07 17:55:55
使用 android:labelFor="@+id/start" 而不是 android:id="@+id/start"。
https://stackoverflow.com/questions/19231410
复制相似问题