I want to hide soft keyboard after AlertDialog dismiss, but it\'s still visible. Here is my code:
alert = new AlertDialo
All these advices to use InputMethodManager
are somewhat vague - where exactly to call it,
and they do not work at least for me.
Yes, keyboard disappears but then the app crashes!?
The main problem is that hiding of keyboard happens at the same time when dialog is disappearing.
To avoid it dialog.dismiss()
should be called in view.postDelayed()
after imm.hideSoftInputFromWindow()
and in my case I set delay as 150.