Android 限制只输入某些值包括数字、字母等
来源:互联网 发布:数据库大并发处理 编辑:程序博客网 时间:2024/06/05 20:04
限制只输入某些值包括数字、字母等
android:digits="0123456789abcdefghigklmnopqrstuvwxyz"
上面这行代码可以是你任何的限制,只能输入什么就到里面写就可以了,上面写的是只可以输入数字和字母。
android:inputType="textPassword"android:digits="0123456789abcdefghigklmnopqrstuvwxyz"这里是只能输入数字和字母并且是密码格式,这两个设置并没有冲突,android:inputType="textPassword"这里是文本,是可以输入中文的,但是要是你加了android:digits="0123456789abcdefghigklmnopqrstuvwxyz",inputType这里的中文就会失效了,但是password不会失效,这里只是打个比方,大家都懂的。
inputType的属性值
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" 时间键盘
0 0
- Android 限制只输入某些值包括数字、字母等
- html限制输入(只允许输入数字字母等)
- Android:限制EditText中只可以输入字母和数字
- 限制EditText只输入数字和字母
- 文本框限制输入数字或者字母等。
- 文本框只允许输入字母及数字,限制输入汉字
- Android 设置EditText只输入数字、字母
- android edittext 只允许输入字母,数字
- text field 限制只输入字母和数字
- iOS开发之限制只输入数字和字母
- html只允许输入的数据校验,只允许输入字母汉字数字等
- Android EditText 限制输入数字和字母设置
- android EditText怎样限制用户的输入?数字/字母/邮箱
- Android EditText 限制输入数字和字母设置
- Android EditText 限制输入数字和字母设置
- Android 代码中设置EditText只输入数字、字母
- Android代码设置EditText只输入数字、字母
- android代码设置EditText只输入数字、字母
- stm32定时器输入捕获pwm
- 数据结构实验图论一:基于邻接矩阵的广度优先搜索遍历
- 如何修改Android系统的版本号
- HDU 5301 Buildings(机智)
- ZOJ3527
- Android 限制只输入某些值包括数字、字母等
- ResourceDictionary.MergedDictionaries 属性wpf
- Android高效布局
- centos中w使用smbclient连接window出现:session setup failed: NT_STATUS_LOGON_FAILURE
- 破解2559
- static关键字学习总结
- HNUOJ13302和13308贪心枚举有俩种情况的想办法直接枚举俩种情况每次枚举比较值
- HDU 5305 Friends(dfs)
- 237、Delete Node in a Linked List [Leetcode]