androidkeyboardandroid-softkeyboard

How do I detect if software keyboard is visible on Android Device or not?


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


Solution

  • 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 How to check visibility of software keyboard in Android?.