1 <EditText2         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 <EditText2         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. Android控件属性大全
  2. 解决android TextView多行文本(超过3行)使用ellipsize属性无效问题
  3. Android属性设置大全
  4. Android控件基本属性介绍
  5. relative相关属性

随机推荐

  1. android shape+selector
  2. 图片旋转的两种方法
  3. android 实现调查问卷-单选-多选
  4. 【Android 电量优化】电量优化 ( 网络状
  5. Android string.xml文件中使用格式化符号
  6. android工程下不能运行java main程序的解
  7. Android签名机制学习笔记
  8. 【Android RTMP】安卓直播推流总结 ( 直
  9. android核心基础(12)_创建模拟器时常见问
  10. Android:unable to start Activity ...的