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

//文本类型,多为大写、小写和数字符号。
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://blog.csdn.net/wyoeap/article/details/8048550

更多相关文章

  1. Android(安卓)在界面中显示以及输入文本信息 TextView和EditText
  2. android类
  3. Android软键盘弹出,布局没有上移的解决办法
  4. Android(安卓)禁止Edittext弹出系统软键盘 的几种方法
  5. Android在全屏状态下键盘覆盖输入框问题
  6. Android判断输入是否只包含数字并且执行跳转功能
  7. android UI小知识点
  8. android控件属性(中文)
  9. Android中设置文本颜色的三种方法

随机推荐

  1. Android(安卓)之 语言 国际化
  2. 使用 Memory Profiler查看Java堆和内存分
  3. Android常用的一些服务demo源码
  4. recovery 的原理已经 rom制作的知识
  5. [Android] SharedPreferences(轻量级的存
  6. [视频] ARMAndroid系统应用分析--华清远
  7. python: android批量多渠道打包
  8. Android(安卓)SDK 开发纪要
  9. android中借助高德地图sdk实现基本的定位
  10. android中的所谓观察者模式