頁面中有個編輯框EditText,進去後就自動獲取焦點並彈出軟件盤,很不友好。
不自動彈出軟件盤:
在manifest中設置
android:windowSoftInputMode="stateAlwaysHidden"
EditText不自動獲取焦點:
在佈局文件中其他的佈局獲取焦點即可:
android:focusable="true"
android:focusableInTouchMode="true"
頁面中有個編輯框EditText,進去後就自動獲取焦點並彈出軟件盤,很不友好。
不自動彈出軟件盤:
在manifest中設置
android:windowSoftInputMode="stateAlwaysHidden"
EditText不自動獲取焦點:
在佈局文件中其他的佈局獲取焦點即可:
android:focusable="true"
android:focusableInTouchMode="true"
代碼如下: String[] abis = new String[]{}; if(Build.VERSION.SDK_INT>=Build.VERSION_CODES.LOLLIPOP) {