What are the main differences between OnEditorActionListener and OnKeyListener?

133 Views Asked by At
  1. I would like to know what are the implications of using TextView.OnEditorActionListener vs View.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 EditTexts

  1. 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 ? An OnKeyListener will propagate to all views listening whilst an OnEditorActionListener would only trigger the TextViews?
0

There are 0 best solutions below