我是一个警告,xml代码是:

<EditText
android:id="@+id/str_ipaddress"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ems="10"
android:inputType="text" />

改成

<EditText
android:id="@+id/str_ipaddress"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ems="10"
android:inputType="text"
android:labelFor="@id/str_ipaddress" />

就好了。

为什么,因为新版本SDK要求填写属性lableFor,类似于填写一个ID来绑定这个控件,第一句已经添加了一个id,直接用那个就行了

This text field does not specify an inputType or a hint

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 />

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

最新文章

  1. 用遗传算法GA改进CloudSim自带的资源调度策略
  2. 5Hibernate入门----青软S2SH(笔记)
  3. php 对url 操作类:url拼接、get获取页面、post获取页面(带传参)
  4. python ide ---wing 注册机
  5. Servlet的四种映射模式
  6. EMIS系统运行时提示【无法验证发行者,您确实要运行此软件吗? 】
  7. Android LayoutInflater 动态地添加删除View
  8. Python 安全类目推荐 (持续更新)
  9. new trip
  10. CSS实现文字竖排 DIV CSS文字垂直竖列排版显示如何实现?
  11. 【转】数据库分页Java实现
  12. Andrdoid中相应用程序的行为拦截实现方式之----从Java层进行拦截
  13. webapp 性能优化
  14. linux 生成随机密码和wordlist常用方法
  15. scss/less语法以及在vue项目中的使用(转载)
  16. 第四届CCCC团体程序设计天梯赛 后记
  17. Oracle单机Rman笔记[0]---环境准备
  18. python 使用gevent模块实现手动挡切换多协程。
  19. dfs问题总结
  20. Django配置富文本编辑器kindeditor

热门文章

  1. javascript addEventListener方法
  2. FOJ 1607 Greedy division 数学题
  3. 使用commons-daemon启动、关闭java程序
  4. 编译Release版本小技巧
  5. Linux Shell常用技巧(一) RE
  6. centos 安装 redis3.2.0 集群
  7. http调试工具Charles Proxy用法详解
  8. iOS:点击button卡死
  9. make工具与Makefile文件
  10. 【Struts2学习笔记(11)】对action的输入校验和XML配置方式实现对action的全部方法进行输入校验