I need to intercept hide keyboard event. For this, I used onKeyPreIme and dispatchKeyEvent. All good, when I push back button, I intercept this KeyEvent.KEYCODE_BACK. But there are problem devices like meizu. Where there is a special button "hide keyboard", which in turn is not caught in the callback. Can you give advice, how I can achive this?
Asked
Active
Viewed 445 times
1 Answers
0
you can use method onMeasure() in your root view to detect if keyboard was shown or hidden https://stackoverflow.com/a/8135035

Community
- 1
- 1

Alexander Pereverzev
- 235
- 1
- 12
-
It doesn't work with android:windowSoftInputMode="adjustPan". I used ViewTreeObserver – Serega Gevelev Dec 15 '16 at 15:29