当前位置: 移动技术网 > 移动技术>移动开发>Android > Android编程开发之EditText中inputType属性小结

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

2019年07月24日  | 移动技术网移动技术  | 我要评论

本文总结分析了android编程开发之edittext中inputtype属性。分享给大家供大家参考,具体如下:

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

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

复制代码 代码如下:
<edittext android:layout_width="fill_parent" android:layout_height="wrap_content"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控件相关内容感兴趣的读者可查看本站专题:《android控件用法总结

希望本文所述对大家android程序设计有所帮助。

如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网