How do I handle ImeOptions’ done button click?

I ended up with a combination of Roberts and chirags answers: ((EditText)findViewById(R.id.search_field)).setOnEditorActionListener( new EditText.OnEditorActionListener() { @Override public boolean onEditorAction(TextView v, int actionId, KeyEvent event) { // Identifier of the action. This will be either the identifier you supplied, // or EditorInfo.IME_NULL if being called due to the enter key being pressed. if (actionId == EditorInfo.IME_ACTION_SEARCH … Read more