键盘的开: imm.toggleSoftInput(InputMethodManager.SHOW_FORCED,
InputMethodManager.HIDE_NOT_ALWAYS);
关: imm.hideSoftInputFromWindow(mEditText.getWindowToken(), 0)
InputMethodManager.HIDE_NOT_ALWAYS);
关: imm.hideSoftInputFromWindow(mEditText.getWindowToken(), 0)
以下设置会形成死循环?:
InputMethodManager imm = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE);
imm.toggleSoftInput(0, InputMethodManager.HIDE_NOT_ALWAYS);
imm.toggleSoftInput(0, InputMethodManager.HIDE_NOT_ALWAYS);