开发者

Android - how to detect soft keyboard shown in the screen [duplicate]

开发者 https://www.devze.com 2023-02-05 23:22 出处:网络
This question already has answers here: Closed 11 years ago. Possible Duplicate: Android: how can i tell if the soft keyboard is showing or not?
This question already has answers here: Closed 11 years ago.

Possible Duplicate:

Android: how can i tell if the soft keyboard is showing or not?

how to detect whether the soft keyboard is shown in the开发者_JAVA技巧 screen or not in android?


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?.

0

精彩评论

暂无评论...
验证码 换一张
取 消