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

前端 未结 5 1830
旧巷少年郎
旧巷少年郎 2020-11-29 08:12

Heres the dilemma: I am showing a screen with 3 input fields and 2 buttons inside of a tab(there are 3 tabs total, and they are on the bottom of the screen). the 2 buttons

5条回答
  •  情深已故
    2020-11-29 09:11

    This might help http://developer.android.com/reference/android/inputmethodservice/InputMethodService.html

    https://android.googlesource.com/platform/packages/inputmethods/LatinIME/+/master/java/src/com/android/inputmethod/latin

    The keyboard code is here, I grepped through it a little but give up, I don't see any Broadcasts being sent that would be of any use, at least in here. Maybe you can go find lower level code in the repo and find a useful Intent being sent. The first linke might tell you when it becomes visible, but I'm not sure how to tell when it becomes invisible.

提交回复
热议问题