I have an edit text which functions as a search box in my application. In Jelly Bean on my Nexus 7 when I type something into the text box which I am listening on and hit en
You dont discover the truth, if you customize return key. You need both set imeActionLabel and imeActionId in your layout. Such as:
imeActionLabel="xxxx"
imeActionId = "6"
In your java code:
@Override
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
if (actionId == EditorInfo.IME_ACTION_DONE) {
doSomeThing();
return true;
}
return false;
}
It will work fine.