I have an activity, with a opened keyboard. I want to perform an action when the keyboard closes. I already tried to use onKeyDown event, but it dont gives any reaction when i press the back key, while the keyboard is open. Only when the keyboard is closed, than it gives reaction xD Any suggestions? Thanks in advance :)
Asked
Active
Viewed 47 times
0
-
check this link [http://stackoverflow.com/questions/4312319/howto-capture-the-virtual-keyboard-show-hide-event-in-android] – katmanco Jul 06 '15 at 12:13
-
I have no code xD thats the reason i ask here for code to use for the keyboard – Jul 06 '15 at 12:26
1 Answers
0
There is no way to do this reliably. There is no way to know when a keyboard is launched or hidden. And the back key press will never get to your app because the system itself is eating it to hide the keyboard. Nor is that the only way the keyboard can be closed (many keyboards have a hide keyboard button). The system just isn't set up to allow for this.

Gabe Sechan
- 90,003
- 9
- 87
- 127