android 1.5以后添加了软件虚拟键盘的功能,所以在输入提示中将会有对应的软键盘模式

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

android:inputType="phone" />
//文本类型,多为大写、小写和数字符号。
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:hint="" 是editText的一个提示 如:editText显示提示:请输入帐号! 当点击editText时这个文字会消失。

更多相关文章

  1. Android inputType ,软键盘输入类型
  2. Android应用程序键盘(Keyboard)消息处理机制分析(25)
  3. Android EditText 自动获取焦点,并弹出键盘
  4. Android 去掉运营商STK对话框提示
  5. Android自动弹出软键盘(输入键盘)
  6. Android产生一个提示框
  7. android监听软键盘enter按键
  8. Android 编译提示R文件找不到

随机推荐

  1. 芝麻信用分SDK接入,显示芝麻信用授权界面(A
  2. Android——Canvas类的使用
  3. 开发技术前线 第六期
  4. android 修改AlertDialog的黑色背景的两
  5. Android中VideoView播放视频不能充满屏幕
  6. Archlinux下配置Android开发环境[转]
  7. Android(安卓)- 文件操作 小结
  8. 新浪微博授权发布 WebView Android
  9. Android(安卓)notification的使用实例
  10. Android(安卓)Handler的使用yu应该注意的