软键盘弹出
- getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
软键盘消失
- private void mimssKeyboard(){
- /** hidden soft keyboard **/
- final View vv = getWindow().peekDecorView();
- if (vv != null && vv.getWindowToken() != null) {
- InputMethodManager imm = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE);
- imm.hideSoftInputFromWindow(vv.getWindowToken(), 0);
- }
- }