EditText html 出现提示 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         />

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

时间: 2024-08-07 06:44:09

EditText html 出现提示 This text field does not specify an inputType or a hint的相关文章

&lt;EditText /&gt; This text field does not specify an inputType or a hint

我是一个警告,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:

This text field does not specify an inputType or a hint

android开发过程中突然发现的warning,EditText 报出 “This text field does not specify an inputType or a hint” 原因: EditText需要指定默认输入类型. 解决办法:添加android:inputType属性或者android:hint属性. hint属性表示EditText的默认文本: inputType表示EditText的值类型: android:inputType参数类型说明: android:inputT

Android警告 &lt;Multiple annotations found at this line: - This text field does not specify an inputType or a hint &gt;

Multiple annotations found at this line: - No label views point to this text field with a labelFor attribute - This text field does not specify an inputType or a hint <坑爹的19-各种改> <EditText>爆出警告 什么原因呢?其实木有错,只是编译器发出警告你没有指定文本框输入类型,如text,number. 指

This text field does not specify an inputType or a

<EditText                 android:id="@+id/searchEditText" android:layout_width="0dp"                 android:layout_height="fill_parent"                 android:layout_weight="1"                 android:backgrou

AxureRP7.0基础教程系列 部件详解 文本框 Text field

原型库网站-讲师金乌原创发布,可自由转载,请注明出处! Axure中文官网:www.AxureRP.cn   <AxureRP7.0部件详解> Text Field 文本框(单行)使用案例 收集表格数据 文本框(单行)经常用于收集表格内容传递给其他表格或其他页面中的表格,还可以进行函数运算. 登陆框 文本框可以用作登陆体验,加入逻辑条件和多个用例还可以对登陆成功/失败进行模拟. 编辑文本框 文本框类型 文本框可以给定特殊的输入格式,主要用来调用移动设备上不同的键盘.可选格式:文本.密码.Ema

一行代码轻松修改 Text Field 和 Text View 的光标颜色 — By 昉

众所周知,Text Field 和 Text View 的光标颜色默认都是系统应用的那种蓝色.而在实际开发中为了让视觉效果更统一,我们可能会想把那光标的颜色设置成和界面色调一致的颜色.其实在 iOS 7 以后只需要一行代码便可以轻松实现: view.tintColor = [UIColor greenColor]; // view是你要修改的 Text Field 或 Text View 或者使用UIAppearance代理直接修改App中所有实例的光标颜色: [[UITextField app

从零开始学ios开发(四):IOS控件(1),Image View、Text Field、Keyboard

长话短说,谢谢大家的关注,这篇写了好长时间,下面继续学习ios.我将用2到3篇的篇幅来学习iphone上的一些常用控件,包括Image View.Text Field.Keyboard.Slider等等,这篇的内容包括ImageView和Keyboard的使用.完成后的效果图如下: 1)创建一个新的project,选择“Single View Application”,命名为“Control Fun”,然后保存.一些和前几章相似的步骤在从这篇起就开始一笔待过了,也不再做截图了,例如这里的创建一个

限制 Text Field 输入的内容类型:只允许输入数字

效果如下: ViewController.h 1 #import <UIKit/UIKit.h> 2 3 @interface ViewController : UIViewController<UITextFieldDelegate> 4 @property (strong, nonatomic) IBOutlet UITextField *txtLimitInput; 5 6 @end ViewController.m 1 #import "ViewControlle

解决Sublime 3提示 Sublime Text Error while loading PyV8 binary

转自:http://blog.initm.com/sublime-text/ 今天打开sublime遇到一个提示  如上图Sublime Text Error while loading PyV8 binary:exit code 1 Try to manually install Pyv8 form https://github.com/emetio/pyv8-binaries 于是到网上寻找答案  解决方法如下: Go to the link provided in the dialog b