There seems to be a couple of ways to detect the hiding and showing of the softkeyboard in Android, such as the answers given here:
How to check visibility of software keyboard in Android?
However, these all rely on the windowSoftInputMode
to be set to adjustResize
. In my case other Views in the same Activity require the windowSoftInputMode
to be set to adjustPan
which means the windowSoftInputMode
needs to be individually toggled by the Views which is not an ideal solution.
Does anyone know a way to detect the hiding and showing of the softkeyboard without setting the windowSoftInputMode
to adjustResize
?