I need a listener's to detect user interaction on my activity which has a fragment attached to it, for which i have overriden diapatchTouchEvent()
which is working fine for touch event and hard key events, but it does not work for soft keyboard keypress.
To intercept keyboard touch events i have tried onUserInteraction()
, dispatchKeyEvents()
, onKeyUp
, onKeyDown
but none of them is working for softkeyboard.
Is there any other way to intercept softkeyboard events in Android?
for above query i have gone through these links :
https://stackoverflow.com/a/25620981/3954050
Android SoftKeyboard onKeyDown/Up not detecting 'alternative' keys