title: How do I trigger an action when the user has hit enter?
body: <p>If (in Android) I have an EditText box, how can I trigger an event when the user has finished entering data and hits return/Next?</p>
  
  <p>I have tried using the code below but it seems to have no effect. I also get an 'The method onEditorAction(EditText, int, KeyEvent) from the type new extView.OnEditorActionListener(){} is never used locally' error.</p>
  
  <pre><code>myEditText.setOnEditorActionListener(new EditText.OnEditorActionListener() {
              public boolean onEditorAction(EditText v, int actionId, KeyEvent event) {
                  if (actionId == EditorInfo.IME_ACTION_NEXT)
                  {
  </code></pre>