android开发过程中突然发现的warning

EditText 报出 “This text field does not specify an inputType or a hint”
 
原因:
EditText需要指定默认输入类型
加入android:inputType="number|phone",表示指定为数字或电话
 
inputtype类型如下:
 //文本类型,多为大写、小写和数字符号。
    android:inputType="none"
    android:inputType="text"
    android:inputType="textCapCharacters"
    android:inputType="textCapWords"
    android:inputType="textCapSentences"
    android:inputType="textAutoCorrect"
    android:inputType="textAutoComplete"
    android:inputType="textMultiLine"
    android:inputType="textImeMultiLine"
    android:inputType="textNoSuggestions"
    android:inputType="textUri"
    android:inputType="textEmailAddress"
    android:inputType="textEmailSubject"
    android:inputType="textShortMessage"
    android:inputType="textLongMessage"
    android:inputType="textPersonName"
    android:inputType="textPostalAddress"
    android:inputType="textPassword"
    android:inputType="textVisiblePassword"
    android:inputType="textWebEditText"
    android:inputType="textFilter"
    android:inputType="textPhonetic"
//数值类型
    android:inputType="number"
    android:inputType="numberSigned"
    android:inputType="numberDecimal"
    android:inputType="phone"//拨号键盘
    android:inputType="datetime"
    android:inputType="date"//日期键盘
    android:inputType="time"//时间键盘

Android的 EditText的inputType类型的更多相关文章

  1. Android限定EditText的输入类型为数字或者英文(包括大小写),EditText,TextView只能输入两位小数

    Android限定EditText的输入类型为数字或者英文(包括大小写) // 监听密码输入框的输入内容类型,不可以输入中文    TextWatcher mTextWatcher = new Tex ...

  2. Android空间EditText的InputType属性

    android中inputType属性在EditText输入值时启动的虚拟键盘的风格有着重要的作用.这也大大的方便的操作.有时需要虚拟键盘只为字符或只为数字.所以inputType尤为重要. < ...

  3. 【转】Android中EditText中的InputType类型含义与如何定义

    原文网址:http://www.crifan.com/summary_android_edittext_inputtype_values_and_meaning_definition/ 经过一些And ...

  4. 【整理】Android中EditText中的InputType类型含义与如何定义( 转 )

    转自:[整理]Android中EditText中的InputType类型含义与如何定义 用到的时候查到了这篇文章觉得很不错,就在此记录下. [背景] 经过一些Android中EditText方面的折腾 ...

  5. Android开发EditText属性

    Android开发EditText属性 EditText继承关系:View-->TextView-->EditText EditText的属性很多,这里介绍几个:android:hint= ...

  6. Android 自定义控件 EditText输入框两边加减按钮Button

    自己封装的一个控件:EditText两边放加减按钮Button来控制输入框的数值 Demo 下载地址: 第一版:http://download.csdn.net/detail/zjjne/674086 ...

  7. Android中Edittext的属性

    //此为转载别人的,挺不错的 1.EditText输入的文字为密码形式的设置 (1)通过.xml里设置: 把该EditText设为:android:password="true"  ...

  8. Android中EditText设置输入条件

    一.应用场景 之前做商城应用时,会有对用户资料的设置情况进行限制,如下: (1)用户邮箱,应当只允许输入英文字母,数字和@.两个符号, (2)用户手机,应当只能输入数字,禁止输入其他字符. (3)用户 ...

  9. Android 之 EditText

    1.使用EditText 的SetInput的方法设置输入类型: 1 //输入类型为没有指定明确的类型的特殊内容类型 2 editText.setInputType(InputType.TYPE_NU ...

随机推荐

  1. innerWidth outerWidth

    在jQuery中: 一.width()方法用于获得元素宽度: 二.innerWidth()方法用于获得包括内边界(padding)的元素宽度; 三.outerWidth()方法用于获得包括内边界(pa ...

  2. Javascript 创建对象的三种方法及比较【转载+整理】

    https://developer.mozilla.org/zh-CN/docs/JavaScript/Guide/Inheritance_and_the_prototype_chain 本文内容 引 ...

  3. spring boot使用slf4j输出日志

    spring boot使用slf4j输出日志 https://blog.csdn.net/qq442270636/article/details/79406346 Spring Boot SLF4J日 ...

  4. Unbuntu和Centos中部署同时多版本PHP的详细过程

        镜像制作:Unbuntu14 部署LAMP过程 1.Azure经典版中创建源Ubuntu14,并使用Xshell连接,并切换到root帐户下. 2.安装php5.4,新建/var/local/ ...

  5. JAVA_SE基础——26.[深入解析]局部变量与成员变量的差别

    黑马程序猿入学blog ... 假设这章节非常难懂的话应该返回去先看  JAVA_SE基础--10.变量的作用域 定义的位置上差别: 1. 成员变量是定义在方法之外,类之内的. 2. 局部变量是定义在 ...

  6. HTTPS与HTTP协议区别

    1.主要区别 (1)超文本传输协议HTTP,HTTP下加入SSL层(位于传输层)的安全协议. (2)HTTP端口为80,HTTPS端口是443. 2.HTTPS通信过程 https 通信传输过程:

  7. Mavlink地面站编写之二--Mission Planner编译

    软件下载:        本文使用VS2013进行编译和改动Mission Planner,其它版本号没有尝试过. 首先下载Mission Planner源码. https://github.com/ ...

  8. Python locale error: unsupported locale setting

    pip don't install package. Python locale error: unsupported locale setting .. >>> import lo ...

  9. Maven让资源文件处理插件能够解析资源文件中的Maven属性

    <build> <resources> <resource> <directory>${project.basedir}/src/main/resour ...

  10. java 读取clob

      java 读取clob CreationTime--2018年7月1日09点41分 Author:Marydon 1.说明 jdbc 数据类型为Clob,与java的String类型相对应. 2. ...