Friday, 16 August 2013

Android - Is there a way to trigger onKeyListener for the soft keyboard?

Android - Is there a way to trigger onKeyListener for the soft keyboard?

The developer reference mentions that OnKeyListener only works for
hardware key events:
"Interface definition for a callback to be invoked when a hardware key
event is dispatched to this view. The callback will be invoked before the
key event is given to the view. This is only useful for hardware
keyboards; a software input method has no obligation to trigger this
listener."
But I was wondering if there's a way to trigger it with the soft keyboard?
I know it does trigger for some devices but it's not consistent.

No comments:

Post a Comment