My goal is to lock the keyboard in order to prevent any kind of texting. How can I detect the android keyboard launch and react.
Asked
Active
Viewed 114 times
0
-
possible duplicate of [Android: Detect softkeyboard open](http://stackoverflow.com/questions/3081276/android-detect-softkeyboard-open) – KyleCrowley Jul 15 '14 at 16:05
1 Answers
0
There is no perfect way to detect android keyboard action (hide or show), i am do a hake on root view that override onSizeChange method. then you can compute view size and detect keyboard show or hide.

miechal
- 1
-
And what if I wanna do it on the background? When my app is not active? – noamcohen97 Jul 16 '14 at 12:31
-
when you app on the background, view can not get focus and your activity maybe pause, in this case you needn't do it. – miechal Jul 18 '14 at 02:39