显示:
InputMethodManager imm = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE);
imm.toggleSoftInput(0,
InputMethodManager.HIDE_NOT_ALWAYS);
隐藏:
InputMethodManager imm = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(mLoginButton.getWindowToken(), 0);