`
y1d2y3xyz
  • 浏览: 252807 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
社区版块
存档分类
最新评论

android EditText inputType 值说明

阅读更多
使用方式如下:<EditText android:inputType="" />

android:inputType="none"
android:inputType="text"
android:inputType="textCapCharacters"//前3个输入普通字符android:inputType="textCapWords"//单词首字母大小
android:inputType="textCapSentences"//仅第一个字母大小
android:inputType="textAutoCorrect"android:inputType="textAutoComplete"//前两个自动完成
android:inputType="textMultiLine"//多行输入
android:inputType="textImeMultiLine"//输入法多行(不一定支持)
android:inputType="textNoSuggestions"//不提示
android:inputType="textUri"//URI格式
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限制输入字符类型的方法总结

    1、第一种方式是通过EditText的inputType来实现,可以通过xml或者Java文件来设置。假如我要设置为显示密码的形式,可以像下面这样设置: 在xml中 Android:inputType=textPassword 在java文件中,可以用 ...

    EditTextInputType.java

    EditTextInputType.java 代码中 动态 设置EditText Inputtype 属性。

    Android编程开发之EditText中inputType属性小结

    android中inputType属性在EditText输入值时启动的虚拟键盘的风格有着重要的作用。这也大大的方便的操作。有时需要虚拟键盘只为字符或只为数字。所以inputType尤为重要。 代码如下:&lt;EditText android:layout_...

    Android EditText限制输入字符的方法总结

     第一种方式: 设置EditText的inputType属性,可以通过xml或者Java文件来设置。假如我要设置为显示密码的形式,可以像下面这样设置: 在xml中, Android:inputType=”textPassword” 在java文件中,可以用 ev....

    Android开发EditText属性.txt

     android:inputType设置文本的类型,用于帮助输入法显示合适的键盘类型。在EditView中再详细说明,这里无效果。  android:linksClickable设置链接是否点击连接,即使设置了autoLink。  android:...

    Android EditText实现输入金额类型详解

    EditText是Android中一个非常实用的控件,有很多InputType,可以来达到不同的输入效果,下面这篇文章主要给大家介绍了关于Android EditText实现输入金额类型的相关资料,需要的朋友可以参考借鉴,下面来一起看看吧。

    Android代码-pin-edittext

    android:inputType: Preferred "textNoSuggestions" (If you want text) or "number" (If you want only number) app:pinSpace: Space between each pin (Default: 16dp) app:pinHeight: Height of each pin ...

    Android代码-轻松地在EditText和TextView之间轻松切换。

    android:inputType android:minLines android:maxLines app:tetv_editing - Initial state of ToggleEditTextView app:tetv_textViewColor - Text color of TextView app:tetv_editTextViewColor - Text color of ...

    Android项目设计与开发:可编辑文本EditText.ppt

    EditText EditText可以通过inputType属性规范其输入内容的特征 EditText EditText的核心应用是获得用户的输入内容 我们可通过id获得某个EditText对象 通过setText方法设置其中的内容 通过getText方法获得控件中的...

    Android实现EditText输入金额

    EditText是Android中一个非常实用的控件,有很多InputType,可以来达到不同的输入效果,如下图: 比如,密码输入,数字输入等等。但是最近在项目中要实现EditText输入金额,金额的限制因素很多,比如,只能输入数字...

    Android中EditText实现不可编辑解决办法

    android:editable is deprecated: Use inputType instead 分析:关于EditText控件的read-only问题,即: 无法通过UI更改其中的内容, 但可以选定部分内容, 进行复制.在早期的sdk, EditText有Editable属性, 现在这个...

    EditText实现输入限制和校验功能实例代码

    2、通过android:inputType限制只能输入数字 android:inputType=number 在android:inputType中可以设置各种限制,比如邮箱地址等等 2)校验 直接通过代码实现 String s=et_verify_empty.getText().toString(); if...

    Android 登录页面的实现代码(密码显示隐藏、EditText 图标切换、限制输入长度)

    etPassword.setInputType(InputType.TYPE_CLASS_TEXT | EditorInfo.TYPE_TEXT_VARIATION_NORMAL); //显示文本 status = false; }else { etPassword.setInputType(InputType.TYPE_CLASS_TEXT | EditorInfo.TYPE_...

    Android中EditText 设置 imeOptions 无效问题的解决方法

    有时候我们需要在EditText 输出完之后 需要在键盘...解决方法 就是去掉 android:maxLines=”1″ 设置 android:singleLine=”true” 有必要还需要 inputType设置为text 网上有一种监听点击回车 搜索的写法 这种写法

    Android编程开发之EditText实现输入QQ表情图像的方法

    本文实例讲述了Android编程开发之EditText实现输入QQ表情图像的方法。分享给大家供大家参考,具体如下: 实现效果如下: 将QQ表情图像放到res下的drawable-hdpi文件夹... android:inputType=text&gt; &lt;/EditText&gt; &lt;

    Android GridView中包含EditText的焦点重新获取方法

    本文实例讲述了Android GridView中包含EditText的焦点重新获取方法。分享给大家供大家参考,具体如下: 项目中遇到的问题是当界面有刷新时,EditText失去焦点,这时候需要...editText.setInputType(InputType.TYPE_CLA

    Get清风android实验2界面设计:基本组件.doc

    android:layout_height="wrap_content"/&gt; &lt;EditText android:id="@+id/phone" android:inputType="text"phone" android:layout_width="200sp" android:layout_height="wrap_content"/&gt; &lt;!-- 在主布局中添加部门...

Global site tag (gtag.js) - Google Analytics