显示:

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);

相关文章:

  • 2021-08-21
  • 2021-08-02
  • 2021-11-28
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-11-18
  • 2021-06-13
  • 2021-07-01
  • 2021-08-31
  • 2021-11-25
  • 2022-12-23
相关资源
相似解决方案