隱藏系統(tǒng)默認(rèn)的輸入法
private void hideKeyboard() {
if (getWindow().getAttributes().softInputMode != WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN) {
if (getCurrentFocus() != null)
((InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE)).hideSoftInputFromWindow(getCurrentFocus().getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS);
}
}
進(jìn)入activity頁面禁止彈出軟鍵盤
android:windowSoftInputMode="stateHidden|stateUnchanged"