Hide soft keyboard after dialog dismiss

前端 未结 8 1701
孤街浪徒
孤街浪徒 2021-01-31 02:16

I want to hide soft keyboard after AlertDialog dismiss, but it\'s still visible. Here is my code:

alert = new AlertDialo         


        
8条回答
  •  -上瘾入骨i
    2021-01-31 03:06

    I met the same problem. Solved it by doing like this. It doesn't need any reference:

    imm.hideSoftInputFromWindow(getWindow().getDecorView()
                    .getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS);
    

提交回复
热议问题