InputMethodManager imm = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE);
//让软键盘消失
imm.toggleSoftInput(0, InputMethodManager.HIDE_NOT_ALWAYS);//让软键盘显示
imm.toggleSoftInput(0, InputMethodManager.RESULT_SHOWN);
InputMethodManager imm = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE);
//让软键盘消失
imm.toggleSoftInput(0, InputMethodManager.HIDE_NOT_ALWAYS);//让软键盘显示
imm.toggleSoftInput(0, InputMethodManager.RESULT_SHOWN);