- I would like to know what are the implications of using
TextView.OnEditorActionListener
vsView.OnKeyListener
This is what the docs say about View.OnKeyListener
This is only useful for hardware keyboards; a software input method has no obligation to trigger this listener.
Yet I see everyone online is using it with KeyEvent.KEYCODE_ENTER
on EditText
s
- I'm using a barcode scanner for input and I noticed, when triggered, it would open/close the
NavigationDrawer
(if the hardware keyboard setting is on). Is this the main difference ? AnOnKeyListener
will propagate to all views listening whilst anOnEditorActionListener
would only trigger theTextView
s?