工作环境(蓝色粗体字为重要内容,红色粗体字为特别注意内容)
1,实验环境:Eclipse+ADT/AndroidStudio
设置EditText只能输入数字和字母
android:inputType="number"(弹出数字键盘)
android:inputType="textEmailAddress"(弹出字母键盘)
android:digits="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
清单文件中,在需要隐藏软键盘的activity中加入
android:windowSoftInputMode="adjustUnspecified|stateHidden"
android中去掉EditText的自动焦点获取
将EditText的父级控设置成:
android:focusable="true"
android:focusableInTouchMode="true"