inputType属性
android中inputType属性在EditText输入值时启动的虚拟键盘的风格有着重要的作用。这也大大的方便的操作。有时需要虚拟键盘只为字符或只为数字。所以inputType尤为重要。
<EditText android:layout_width="fill_parent" android:layout_height="wrap_content"android:inputType="text" />
//文本类型,多为大写、小写和数字符号。
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:textColorHint设置提示hint信息的颜色。
//数值类型
android:inputType="number" 数字
android:inputType="numberSigned" 带符号数字格式
android:inputType="numberDecimal" 带小数点的浮点格式
android:inputType="phone" 拨号键盘
android:inputType="datetime" 时间日期
android:inputType="date" 日期键盘
android:inputType="time" 时间键盘
参考自:http://my.oschina.net/u/1866821/blog/360894
inputType属性的更多相关文章
- Android空间EditText的InputType属性
android中inputType属性在EditText输入值时启动的虚拟键盘的风格有着重要的作用.这也大大的方便的操作.有时需要虚拟键盘只为字符或只为数字.所以inputType尤为重要. < ...
- android中 EditTex t的 inputType 属性
//文本类型,多为大写.小写和数字符号 android:inputType="none" android:inputType="text" a ...
- 关于android:inputType属性的说明
<EditText android:layout_width="fill_parent" android:layout_height="wrap_content&q ...
- 关于Android控件EditText的属性InputType的一些经验,java组合多个参数
关于Android控件EditText的属性InputType的一些经验 2013-11-14 15:08:02| 分类: 默认分类|举报|字号 订阅 1.InputType属性在代码中 ...
- android EditText中inputType的属性列表
android 1.5以后添加了软件虚拟键盘的功能,所以在输入提示中将会有对应的软键盘模式 android中inputType属性在EditText输入值时启动的虚拟键盘的风格有着重要的作用.这也大大 ...
- 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” 原因: ...
- Android资料之-EditText中的inputType
在编写有EditText的自定义控件的时候可能会用到EditText的inputType属性,直接在xml里写这个属性的时候是用字符串型的,不过动态设置的时候就变成int型了,InputType里有定 ...
- 关于设置android:imeOptions属性无效的解决办法
在对Android的EditText控件进行设置时,经常会限定一下输入法的属性,设置右下角为完成或者搜索等,一般都会想到android:imeOptions属性,但是仅仅这么设置通常是无效的,还要搭配 ...
- android EditText中的inputType
android 1.5以后添加了软件虚拟键盘的功能,所以在输入提示中将会有对应的软键盘模式 android中inputType属性在EditText输入值时启动的虚拟键盘的风格有着重要的作用.这也大大 ...
随机推荐
- jQuery源码解读-事件分析
最原始的事件注册 addEventListener方法大家应该都很熟悉,它是Html元素注册事件最原始的方法.先看下addEventListener方法签名: element.addEventList ...
- Web API应用架构设计分析(1)
Web API 是一种应用接口框架,它能够构建HTTP服务以支撑更广泛的客户端(包括浏览器,手机和平板电脑等移动设备)的框架, ASP.NET Web API 是一种用于在 .NET Framewor ...
- jquery列表顺序倒转排序效果
html文件代码: <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type&quo ...
- c#单例模式的实现
单例模式定义:一个类有且仅有一个实例,并且自行实例化向整个系统提供. 实现要点: 1.是单例模式的类只提供私有的构造函数. 2.是类定义中含有一个该类的静态私有对象. 3.是该类提供了一个静态的共 ...
- 使用Toast的setText()实现倒计时
点击按钮发送短信以后,倒计时3秒钟后退出Activity.本来想用弹出多个Toast的方法实现,后来发现效果不好,因为Toast.LENGTH_LONG显示3秒钟,Toast.LENGTH_SHORT ...
- 【Java每日一题】20161014
20161013问题解析请点击今日问题下方的"[Java每日一题]20161014"查看 package Oct2016; import java.util.Arrays; imp ...
- Scala确实是门好语言
看完了一本Scala的书,整体感觉很不错,语法很简洁,对用惯了脚本语言的人来说语言特性稍微有点复杂,不过对Java用户应该没有压力. 最牛叉的有两点:并发.面向领域编程
- Time series database
https://en.wikipedia.org/wiki/Time_series_database https://influxdb.com/docs/v0.9/introduction/getti ...
- 详解 Spring 3.0 基于 Annotation 的依赖注入实现(转)
使用 @Repository.@Service.@Controller 和 @Component 将类标识为 Bean Spring 自 2.0 版本开始,陆续引入了一些注解用于简化 Spring 的 ...
- 【FFmpeg】Windows下64位ffmpeg编译
本文主要记录在64位Windows 7下,编译64位ffmpeg的过程. 1.资源准备 (1). MSYS http://sourceforge.net/projects/mingwbuilds/fi ...