3

Is there a way to be notified when the keyboard is about to show, or has shown? The following events would be great:

keyboardWillShow keyboardDidShow keyboardWillHide keyboardDidHide

synic
  • 26,359
  • 20
  • 111
  • 149
  • Possibly helpful link: http://developer.android.com/guide/topics/manifest/activity-element.html#config – Tyler Sep 30 '10 at 03:06

2 Answers2

2

The only way is to override the View's onSizeChanged() method. See this thread on the Android Developers group:

http://groups.google.com/group/android-developers/browse_thread/thread/9d1681a01f05e782

James
  • 3,729
  • 3
  • 20
  • 16
0

As MatrixFrog mentioned you can use the Activity's onCofigurationChanged method. With that you have keyboardWillShow and keyboardWillHide.

To get the other two you can try using one of the InputMethodManager's methods but I don't think a callback like that exists.

Macarse
  • 91,829
  • 44
  • 175
  • 230