andreea andreea - 1 month ago 8
Android Question

How do I Detect if Software Keyboard is Visible on Android Device?

Is there a way in Android to detect if the software (a.k.a. "soft") keyboard is visible on screen?

Answer

There is no direct way - see http://groups.google.com/group/android-platform/browse_thread/thread/1728f26f2334c060/5e4910f0d9eb898a where Dianne Hackborn from the Android team has replied. However, you can detect it indirectly by checking if the window size changed in #onMeasure. See Android: Is software keyboard shown?.

Comments