Hide Soft Keyboard

后端 未结 1 1738
予麋鹿
予麋鹿 2021-02-14 01:18

I need to be able to hide the soft keyboard in response to clicking a button. I have seen numerous posts on this subject and it seems that the solution is to use the Inpu

1条回答
  •  温柔的废话
    2021-02-14 02:09

    You might want to try:

    InputMethodManager inputManager = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE);
    inputManager.hideSoftInputFromWindow(editView.getWindowToken(), 0);
    

    0 讨论(0)
提交回复
热议问题