This text field does not specify an inputType or a hint
2018-02-02 12:10
609 查看
android开发过程中突然发现的warning
EditText 报出 “This text field does not specify an inputType or a hint”
原因:
EditText须要指定默认输入类型
增加android:inputType="number|phone",表示指定为数字或电话
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"//时间键盘
EditText 报出 “This text field does not specify an inputType or a hint”
原因:
EditText须要指定默认输入类型
增加android:inputType="number|phone",表示指定为数字或电话
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"//时间键盘
相关文章推荐
- “This text field does not specify an inputType or a hint”错误
- EditText:This text field does not specify an inputType or a hint
- Android开发出现”This text field does not specify an inputType or a hint“
- This text field does not specify an inputType or a hint
- 警告:This text field does not specify an inputType or a hint
- This text field does not specify an inputType or a hint
- Android学习系列第一弹之《warning:This text field does not specify an inputType or a hint》
- 安卓手机开发,This text field does not specify an inputType or a hint
- 关于安卓开发提示:This text field does not specify an inputType or a hint
- This text field does not specify an inputType or a hint
- (EditText)This text field does not specify an inputType or a hint
- 关于Android的This text field does not specify an inputType or a hint 问题
- Android:This text field does not specify an inputType or a hint
- This text field does not specify an inputType or a hint
- This text field does not specify an inputType or a hint
- This text field does not specify an inputType or a hint
- Android This text field does not specify an inputType or a hint 解决
- android学习记录(This text field does not specify an inputType or a hint)
- This text field does not specify an inputType or a hint
- 黄色警告: This text field does not specify an inputType or a hint