首页 > Web开发 > 详细

EditText html 出现提示 This text field does not specify an inputType or a hint

时间:2015-05-20 00:20:34      阅读:229      评论:0      收藏:0      [点我收藏+]
1 <EditText
2         android:layout_width="fill_parent"
3         android:layout_height="wrap_content"
4         android:minLines="3"
5         android:id="@+id/message"
6         />

        这样写的时候突然发现有黄色的叹号出现,提示:"This text field does not specify an inputType or a hint";

        原因是这个编辑框缺少一个属性:hint。

        hint属性作用如下:

        技术分享

    修改后代码为:   

技术分享
1 <EditText
2         android:layout_width="fill_parent"
3         android:layout_height="wrap_content"
4         android:minLines="3"
5         android:hint="@null"
6         android:id="@+id/message"
7         />
技术分享

   添加后黄色叹号就消失了。

EditText html 出现提示 This text field does not specify an inputType or a hint

原文:http://www.cnblogs.com/yelanggu/p/4515855.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!