I am testing the imeOption
feature in Android EditText. I understand how it works and the various options like Go, Search, Done etc. My question relates to its event listener.
Take this answer, for example, the setOnEditorActionListener
gets invoked when the right corner button on the soft keyboard is clicked.
The setOnEditorActionListener
will get invoked regardless (if I'm right) of what time option is specified (as long as there is one); then why bother checking what action it was? Won't an Edit text have a fixed time option specified in the xml layout? I don't understand when setOnEditorActionListener
gets invoked why does everyone check action id ?