Android Studio:EditText的所有inputType形式(后续继续补充)

在开发中,EditText可以在属性inputType中设置输入类型,例如text、常用的number数字输入、常用的password密码输入(会自动隐藏输入的文本),那么EditText的inputType有哪些值,表现形式又是怎么样的讷?

在xml文件中按住ctrl键点击inputType可以去查看其包含的值:(非常多,只截取了部分)

目录,方标查找,看看实际效果

 none


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:提交密码,回车按键会变成提交按键

 

number:数字输入框

numberSigned

numberDecimal

numberPassword:数字密码,文本会自动加密

phone:输入手机号输入框

datetime:输入日期时间

date:输入日期

time:输入时间

猜你喜欢

转载自blog.csdn.net/m0_59558544/article/details/130477029
今日推荐