Android应用程序开发中的EditText警告

2024-05-22

在 xml 文件中声明 EditText 时,我收到了如下警告:

没有标签视图通过 android:labelFor="@+id/@+id/start" 属性指向此文本字段

编辑文本代码是

<EditText
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"        
    android:id="@+id/start"
    android:hint="@string/edit_message" />

我也不知道这个错误消息试图通知我做什么!

幸好我找到了一个解释:http://thecodeiscompiling.blogspot.com/2013/12/android-labelfor-waning-fix.html http://thecodeiscompiling.blogspot.com/2013/12/android-labelfor-waning-fix.html

该警告告诉您,EditText 字段没有可在打开辅助功能时向用户读取的 TextView,因为您尚未使用 android:labelFor 属性指定 TextView。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

Android应用程序开发中的EditText警告 的相关文章

随机推荐