1 <EditText
2         android:layout_width="fill_parent"
3         android:layout_height="wrap_content"
4         android:minLines="3"
5         android:
6         />

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

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

        hint属性作用如下:

        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:hint="@null"
6         android:
7         />

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

 

相关文章:

  • 2022-12-23
  • 2021-12-15
  • 2021-07-26
  • 2022-12-23
  • 2022-12-23
  • 2021-08-02
  • 2021-08-01
猜你喜欢
  • 2021-11-26
  • 2021-12-24
  • 2021-10-18
  • 2022-12-23
  • 2022-12-23
  • 2021-10-02
相关资源
相似解决方案