This text field does not specify an inputType or a hint
2017-05-22 16:29
281 查看
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 />
添加后黄色叹号就消失了。
相关文章推荐
- This text field does not specify an inputType or a hint
- Android This text field does not specify an inputType or a hint 解决
- Android学习系列第一弹之《warning:This text field does not specify an inputType or a hint》
- This text field does not specify an inputType or a hint
- EditText:This text field does not specify an inputType or a hint
- “This text field does not specify an inputType or a hint”错误
- 关于Android的This text field does not specify an inputType or a hint 问题
- 用Eclipse编译android程序时,出现警告This text field does not specify an inputType or a hint
- This text field does not specify an inputType or a hint
- 安卓手机开发,This text field does not specify an inputType or a hint
- This text field does not specify an inputType or a hint
- This text field does not specify an inputType or a hint
- This text field does not specify an inputType or a hint
- This text field does not specify an inputType or a hint
- android学习记录(This text field does not specify an inputType or a hint)
- 编辑控件的警告提示是:This text field does not specify an inputType or a hint
- This text field does not specify an inputType or a hint
- This text field does not specify an inputType or a hint
- This text field does not specify an inputType or a hint
- 黄色警告: This text field does not specify an inputType or a hint