I am a relative newbie with Android. Does anyone have a reasonable explanation on how to listen to keys and soft keys in EditText / TextView?
I would like to see a comprehensive tutorial or many examples.
As I understand it, I can add KeyListener to my activity, for example. onKeyDown (), onKeyUp (), but when I try to do this, I can not trigger events for regular keys with only HOME and BACK, for example.
I saw a mention of using TextWatcher, but this is not the same as handling raw key events.
On SO, there seem to be a few half-solutions. Hoping you can help eliminate the fog of confusion ...
source
share