tags:

views:

183

answers:

2

I need to do a very simple thing - find out if the software keyboard is shown. Is this possible in Android?

A: 

The InputMethodManager has information about the soft keyboard. You get it from an activity via:

((InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE))

You might play around with that to see what it can tell you. You can use it to show or hide the soft input...

Mayra
I have looked at InputMethodManager before and unfortunately I couldn't find anything that could tell me if keyb. is open or hidden.
fhucho
+1  A: 

I seem to recall Ms. Hackborn indicating that there are no events that indicate when the IME is displayed.

CommonsWare