EditText Lose Focus After Soft Keyboard Is Shown In Android

I tried quite a number of suggestions while I sifted through the Stackoverflow forum but one of them worked without hassles.

It is short and simple: simulate a tap on the EditText component.

You can do this by doing:

That’s all.

Of course, when doing it programmatically, the first thing we do is call requestFocus() but there are certain cases where the soft keyboard will not show up. The code above will ensure that the soft keyboard will always show when it is called.

Related Posts Plugin for WordPress, Blogger...


  1. @chitgoks:disqus Thanks for the answer but i implemented the two above lines and it focus the autoComplete edit text but the keyboard and the suggestions are not showing up 🙁

  2. wait, im confused what suggestion are you talking about? keyboard words suggestions?

    not sure about that cuz i always turn off hints, as for keyboard you could try manually calling it to show.

    other than that, i got nothin else. sorry

  3. @disqus_0iP6nqgtz6:disqus sorry cant help you. i have not tried using autocomplete on keyboareds since i always disable that annoying feature.

Leave a Reply

Your email address will not be published. Required fields are marked *