警告的EditText在Android应用开发 [英] EditText warning in android app development

查看:194
本文介绍了警告的EditText在Android应用开发的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

而在XML文件中声明的EditText,我正好低于警告

给出

  

没有标签的观点指向该文​​本字段的机器人:labelFor =@ + ID / @ + ID /启动属性。


的EditText code是

 <的EditText
    机器人:layout_width =WRAP_CONTENT
    机器人:layout_height =WRAP_CONTENT
    机器人:ID =@ + ID /启动
    机器人:提示=@字符串/ edit_message/>


解决方案

我也完全不知道这个错误讯息是想告诉我的事!

值得庆幸的是我发现了一个解释:的http://the$c$ciscompiling.blogspot.com/2013/12/android-labelfor-waning-fix.html


  

该警告是告诉你的EditText字段不具有可访问时开启,可以读取用户的TextView的,因为你还没有指定了一个与Android:labelFor属性


While declaring EditText in xml file, I was warned exactly as given below

No label views point to this text field with an android:labelFor="@+id/@+id/start" attribute

EditText code is

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

解决方案

I also had no idea what this error message was trying to inform me to do!

Thankfully I found an explanation: http://thecodeiscompiling.blogspot.com/2013/12/android-labelfor-waning-fix.html

the warning is telling you the EditText field does not have a TextView that can be read to a user when accessibility is turned on, since you haven't specified one with the android:labelFor attribute.

这篇关于警告的EditText在Android应用开发的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆