Search code examples
androidkeyboardime

Keyboard "locks" apk in landscape mode


I have an IME (soft keyboard) APK (I have the source of the APK ) that works properly except the following case:
When an apk needs IME (i.e., it needs a keyboard) and we are in landscape mode, the keyboard is opened (in the bottom half of the screen), but touching the top half (the apk that needs IME) does not close the keyboard (I need to close it with the Back button).
How can I change the keyboard to be closed when touching the top half of the screen?


Solution

  • Finally, after many tries, I changed the method

    onEvaluateFullscreenMode()
    of the class in my keyboard that extends InputMethodService.
    This method returned true while it should have return false in the case of the locked APK (Waze is the locked APK, I don't blame them).
    For this I used the method
    getCurrentInputEditorInfo()
    and the member packageName of EditorInfo to find that it is a Waze's EditText.
    This solution is not ideal but I didn't find a better one.