Android资料之-EditText中的inputType
在编写有EditText的自定义控件的时候可能会用到EditText的inputType属性,直接在xml里写这个属性的时候是用字符串型的,不过动态设置的时候就变成int型了,InputType里有定义了对应的常量,在自定义控件需要通过在xml里写参数的形式来控制控件里的EditText的这个属性的时候,可以根据字符型返回对应的int值来动态设置。 下面是EditText里的inputType的所有值和说明,来自于网络。 //文本类型,多为大写、小写和数字符号。 android:inputType=”none” android:inputType=”text” android:inputType=”textCapCharacters” 字母大写 android:inputType=”textCapWords” 首字母大写 android:inputType=”textCapSentences” 仅第一个字母大写 android:inputType=”textAutoCorrect” 自动完成 android:inputType=”textAutoComplete” 自动完成 andro...
