首页 > 其他 > 详细

This text field does not specify an inputType or a

时间:2015-04-17 11:54:38      阅读:142      评论:0      收藏:0      [点我收藏+]

<EditText
                android:id="@+id/searchEditText"

                android:layout_width="0dp"
                android:layout_height="fill_parent"
                android:layout_weight="1"
                android:background="@null"
                android:ems="10"
                android:imeOptions="actionDone"
                android:singleLine="true"
                android:textSize="16sp" >

                <requestFocus />
</EditText>

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

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

android:hint="@null"

修改为:

<EditText
android:id="@+id/searchEditText"
android:hint="@null"
android:layout_width="0dp"
android:layout_height="fill_parent"
android:layout_weight="1"
android:background="@null"
android:ems="10"
android:imeOptions="actionDone"
android:singleLine="true"
android:textSize="16sp" >

<requestFocus />
</EditText>

 

This text field does not specify an inputType or a

原文:http://my.oschina.net/u/1046838/blog/402750

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