在开发中,EditText可以在属性inputType中设置输入类型,例如text、常用的number数字输入、常用的password密码输入(会自动隐藏输入的文本),那么EditText的inputType有哪些值,表现形式又是怎么样的讷?
在xml文件中按住ctrl键点击inputType可以去查看其包含的值:(非常多,只截取了部分)
目录,方标查找,看看实际效果
none
text
textCapCharacters:输入大写字母
textCapWords
textCapSentences
textAutoCorrect
textAutoComplete
textMultiLine
textImeMultiLine:提供多行文本输入,回车键变为换行
textNoSuggestions
textUri:输入url路径
扫描二维码关注公众号,回复:
15221132 查看本文章
textEmailAddress:输入邮箱地址
textEmailSubject
textShortMessage
textLongMessage
textPersonName
textPostalAddress
textPassword:文本密码,输入的文本会自动隐藏
textVisiblePassword
textWebEditText
textFilter
textPhonetic
textWebEmailAddress
textWebPassword:提交密码,回车按键会变成提交按键