Android: which event fires when on screen keyboard appears?

后端 未结 2 699
傲寒
傲寒 2020-12-18 04:25

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 (o

相关标签:
2条回答
  • 2020-12-18 04:40

    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 讨论(0)
  • 2020-12-18 04:43

    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.

    0 讨论(0)
提交回复
热议问题