I want to hide soft keyboard after AlertDialog dismiss, but it\'s still visible. Here is my code:
alert = new AlertDialo
This works! This will close the keyboard after dialog dismiss
InputMethodManager imm = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE);
imm.toggleSoftInput(InputMethodManager.HIDE_IMPLICIT_ONLY, 0);
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);