設置EditText只能輸入數字和字母
android:inputType="number" android:digits="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
清單文件中,在需要隱藏軟鍵盤的activity中加入
android:windowSoftInputMode="adjustUnspecified|stateHidden"
android中去掉EditText的自動焦點獲取
將EditText的父級控設置成:
android:focusable="true"
android:focusableInTouchMode="true"