I simply want to catch the event when the user press enter on an editText.
I did not get the Toast message, not the \"Enter pressed\" and not the \"Some key pressed!
myEditText.setOnEditorActionListener(new OnEditorActionListener() {
public boolean onEditorAction(TextView arg0, int arg1, KeyEvent arg2) {
Toast.makeText(getApplicationContext(), "some key pressed", Toast.LENGTH_LONG)
.show();
return false;
}
});
This code displays me some key pressed when pressed enter key after typing something in my edittext. But I don't know what is problem in your code.