开发者

Android: which event fires when on screen keyboard appears?

I'd like to hook to an event that fires when android's on screen keyboard appears. For example when user开发者_如何学Go taps EditText to bring up the keyboard. Anyone know which event (or listener) to use?

Timo


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.


There won't be a way to determine when the keyboard comes up, but if you want to check when the user taps on an edittext you can register a click listener or an onfocuschangedlistener to that view.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜