在开发的过程中,通常会用到EditText,如何让虚拟键盘来适应输入框中内容的类型,通常我们都会在xml文件中加入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 inputType说明的更多相关文章

  1. android EditText inputType 及 android:imeOptions=”actionDone”

    一.android 软件盘事件响应 在android中,有时需要对EditText实现软件盘监听的场景.当android按下软键盘的时候,响应完成.发送.搜索或者其他事件. Google 提供了 Ed ...

  2. android EditText中的inputType

    android 1.5以后添加了软件虚拟键盘的功能,所以在输入提示中将会有对应的软键盘模式 android中inputType属性在EditText输入值时启动的虚拟键盘的风格有着重要的作用.这也大大 ...

  3. Android EditText光标颜色 与inputType

    1.EditText有一个属性:android:textCursorDrawable,这个属性是用来控制光标颜色的   android:textCursorDrawable="@null&q ...

  4. android EditText中inputType的属性列表

    android 1.5以后添加了软件虚拟键盘的功能,所以在输入提示中将会有对应的软键盘模式 android中inputType属性在EditText输入值时启动的虚拟键盘的风格有着重要的作用.这也大大 ...

  5. Android EditText不弹出输入法焦点问题的总结

    转自:http://mobile.51cto.com/aprogram-403138.htm 看一个manifest中Activity的配置,如果这个页面有EditText,并且我们想要进入这个页面的 ...

  6. Android EditText属性

    1.EditText输入的文字为密码形式的设置 (1)通过.xml里设置: 把该EditText设为:android:password="true" // 以”.”形式显示文本 ( ...

  7. Android EditText自动弹出输入法焦点

    http://mobile.51cto.com/aprogram-403138.htm 1. 看一个manifest中Activity的配置,如果这个页面有EditText,并且我们想要进入这个页面的 ...

  8. Android EditText默认不弹出输入法,以及获取光标,修改输入法Enter键的方法

    一.Android EditText默认不弹出输入法的办法:1. 在AndroidManifest.xml中将需要默认隐藏键盘的Activity中添加属性即可(常用此方法) android:windo ...

  9. Android EditText不弹出输入法总结,焦点问题的总结

    看一个manifest中Activity的配置,如果这个页面有EditText,并且我们想要进入这个页面的时候默认弹出输入法,可以这样设置这个属相:android:windowSoftInputMod ...

随机推荐

  1. 学习WPF——了解路由事件

    入门 我们先来看一个例子 前台代码: 后台代码: 点击按钮的运行效果第一个弹出窗口 第二个弹出窗口: 第三个弹出窗口: 说明 当点击按钮之后,先触发按钮的click事件,再上查找,发现stackpan ...

  2. 在stackoverflow上使用markdown

    stackoverflow流派的markdown. Code and Preformatted Text 缩进四个空格,就可以写代码片段了 def hello(): print "hello ...

  3. 写给自己看的Linux运维基础(三) - Mono

    如果使用ubuntu,可使用apg-get安装完mono,xsp,mod_mono,我的yum源并没有找到mono可安装,网上也没找到CentOS的源,最后选择下载编译安装. Stackoverflo ...

  4. RESTful API设计指南

    网络应用程序,分为前端和后端两个部分.当前的发展趋势,就是前端设备层出不穷(手机.平板.桌面电脑.其他专用设备......). 因此,必须有一种统一的机制,方便不同的前端设备与后端进行通信.这导致AP ...

  5. centos 关闭防火墙

    在centos上搭建了个服务器,本机可以访问,局域网无法访问 解决方案:关闭防火墙 sudo systemctl stop firewalld.service 令人恼火的是stop iptables之 ...

  6. paip.c3p0 nullpointexcept 配置文件根路径读取bug 解决

    paip.c3p0 nullpointexcept 配置文件根路径读取bug 解决 windows ok linux犯错误... 查看loging, 初始化的时候儿jdbcurl,user,pwd都是 ...

  7. paip.提升稳定性---c3p0数据库连接池不能取到连接An attempt by a client to checkout a Connection has timed out

    paip.提升稳定性---c3p0数据库连接池不能取到连接An attempt by a client to checkout a Connection has timed out 作者Attilax ...

  8. Leetcode 166. Fraction to Recurring Decimal 弗洛伊德判环

    分数转小数,要求输出循环小数 如2 3 输出0.(6) 弗洛伊德判环的原理是在一个圈里,如果一个人的速度是另一个人的两倍,那个人就能追上另一个人.代码中one就是速度1的人,而two就是速度为2的人. ...

  9. android: SQLite升级数据库

    如果你足够细心,一定会发现 MyDatabaseHelper 中还有一个空方法呢!没错,onUpgrade() 方法是用于对数据库进行升级的,它在整个数据库的管理工作当中起着非常重要的作用,可 千万不 ...

  10. PoolMon 使用

    PoolMon 显示   PoolMon 在命令窗口中显示有关池内存分配的数据列.使用箭头键.PAGE UP 和 PAGE DOWN 键在数据间滚动. 注意   若要查看全部 PoolMon 显示,则 ...