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 />

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

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

  1. <EditText /> This text field does not specify an inputType or a hint

    我是一个警告,xml代码是: <EditText android:id="@+id/str_ipaddress" android:layout_width="wra ...

  2. 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”   原因: ...

  3. 编辑控件的警告提示是:This text field does not specify an inputType or a hint

    没有设置editText的inputtype属性,比如<android:inputtype="textpassword"> http://binuu.blog.51ct ...

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

    长话短说,谢谢大家的关注,这篇写了好长时间,下面继续学习ios.我将用2到3篇的篇幅来学习iphone上的一些常用控件,包括Image View.Text Field.Keyboard.Slider等 ...

  5. 当开始输入文字以及完成文字输入时,变换text field的背景以及系统自带一键删除的 叉叉

    当开始输入文字以及完成文字输入时,变换text field的背景. -(BOOL) textFieldShouldBeginEditing:(UITextField *)textField{ [tex ...

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

    效果如下: ViewController.h #import <UIKit/UIKit.h> @interface ViewController : UIViewController< ...

  7. 操作MySQL出错提示“BLOB/TEXT column request_data in key specification without a key length”解决办法

    错误原因: 查阅资料后才知道,原来Mysql数据库对于BLOB/TEXT这样类型的数据结构只能索引前N个字符.所以这样的数据类型不能作为主键,也不能是UNIQUE的.所以要换成VARCHAR,但是VA ...

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

    众所周知,Text Field 和 Text View 的光标颜色默认都是系统应用的那种蓝色,如图: 而在实际开发中为了让视觉效果更统一,我们可能会想把那光标的颜色设置成和界面色调一致的颜色.其实在 ...

  9. pandas对象保存到mysql出错提示“BLOB/TEXT column used in key specification without a key length”解决办法

    问题 将DataFrame数据保存到mysql中时,出现错误提示: BLOB/TEXT column used in key specification without a key length 原因 ...

随机推荐

  1. Nunit工具做C#的单元测试

      Nunit工具做C#的单元测试 学习心得 编写人:罗旭成 时间:2013年9月2日星期一 1.开发人员如何做单元测试 单元测试是针对最小的可测试软件元素(单元)的,它所测试的内容包括单元的内部结构 ...

  2. 像素图的实时光照 Lighting on Pixel Art

    去年有这样一个工具,We got one toolkit last year. 他有什么功能呢?What is its function? 让你画出各个方向的照明图 That you can draw ...

  3. js模版引擎handlebars.js实用教程——结束语

    返回目录 有了这些功能,[ajax+json+Handlebars]替代[vo+el表达式]不成问题,新时代的曙光已经来临,最佳解决方案在此,您还等什么? 教程到此结束...祝读者学习愉快... 小菜 ...

  4. HTML5触屏版多线程渲染模板技术分享

    前言: 了解js编译原理的屌丝们都知道,js是单线程的,想当年各路神仙为了实现js的多线程,为了解决innerHTML输出大段HTML卡页面的顽疾,纷纷设计了诸如假冒的“多线程“实现,我自己也在写开源 ...

  5. 如何在win7系统中安装redis

    转载于:http://www.itxuexiwang.com/a/shujukujishu/redis/2016/0216/92.html?1455871954 如何在win7系统中安装redis​ ...

  6. GridView和DATAGRID前后台查询用法的比较

    Grideview前台: <DIV class="mainDiv" id="GridWidth"> <ASP:GridView id=&quo ...

  7. react8 组件之间的通信

    <body><!-- React 真实 DOM 将会插入到这里 --><div id="example"></div> <!- ...

  8. ValidationSummary控件不弹出错误提示框

    采用VS2013 编写的前台,运用ValidationSummary控件时,不出现错误弹窗,网上找到了解决方法 发现是ASP.NET 4.5对验证控件的影响(兼容性),使用ASP.NET 4.5的解决 ...

  9. java中的显示初始化和特定初始化

    public class Test{ public static void main(String[] args){ Child child = new Child(); } } class Pare ...

  10. Cwinux源码解析系列

      Cwinux源码解析系列