I'd like to hook to an event that fires when android's on screen keyboard appears. For example when user taps EditText to bring up the keyboard. Anyone know which event (or listener) to use?
Timo
To handle an individual key press, implement onKeyDown() or onKeyUp() as appropriate. Usually, you should use onKeyUp() if you want to be sure that you receive only one event. If the user presses and holds the button, then onKeyDown() is called multiple times.
Instead of having physical keys, your device will show pictures of keys on the screen, which you can tap on. Different smartphones and tablets have slightly different keyboards, and your device will also show different keyboards for different functions.
According to following discussion thread in Android Developers Google Group the only way to solve this is to listen to size changed events of the main view. The thread is pretty old though. I wonder if any of the newer APIs have provided better way.
http://groups.google.com/group/android-developers/browse_thread/thread/9d1681a01f05e782
The last post explains a logic behind a working solution.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With