I'm having a problem with the behavior of the latest Jelly Bean emulator. I have several EditTexts
in my app. An OnEditorActionListener
provides special handling when a user presses the ENTER key on the keyboard. This worked up until ICS, but now on Jelly Bean the listener callback method onEditorAction()
no longer gets called. Only a new line is inserted into the EditText
.
This can be reproduced this way:
EditText testEditText = new EditText(context);
testEditText.setOnEditorActionListener(new OnEditorActionListener() {
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
Log.d(TAG, "onEditorAction() called");
return false;
}
});
addView(testEditText);
Is this a bug in Jelly Bean? Or in the emulator? Or has the behavior been changed intentionally?
Curiously someone else writes that the method gets called, but with unexpected parameters, on a Nexus 7 running Jelly Bean here: null keyevent and actionid = 0 in onEditorAction() (Jelly Bean / Nexus 7)