title: App crashes when clearing EditText
body: <p>I am making this try-out game and after someone guesses a number, the EditText view, needs to be cleared.</p>
  
  <p>Here is my onCreate:</p>
  
  <pre><code>    @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_game);
  
      Button b = (Button) findViewById(R.id.check);
      final EditText input = (EditText) findViewById(R.id.number);
      b.setOnClickListener(new View.OnClickListener() {
          public void onClick(View v) {
              if (!input.getText().toString().matches("")) {
                  input.setText("");
                  handleGuess(Integer.parseInt(input.getText().toString()));
              } else {
                  Toast.makeText(getApplicationContext(), "Je hebt geen nummer ingevuld!", Toast.LENGTH_SHORT)
                          .show();
              }
          }
      });
  
      input.setOnEditorActionListener(new TextView.OnEditorActionListener() {
          public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
              if ((event != null &amp;&amp; (event.getKeyCode() == KeyEvent.KEYCODE_ENTER)) || (actionId == EditorInfo.IME_ACTION_DONE)) {
                  if (!input.getText().toString().matches("")) {
                      input.setText("");
                      handleGuess(Integer.parseInt(input.getText().toString()));
                  } else {
                      Toast.makeText(getApplicationContext(), "Je hebt geen nummer ingevuld!", Toast.LENGTH_SHORT)
                              .show();
                  }
              }
              return false;
          }
      });
  }
  </code></pre>
  
  <p>Whenever I try to press Enter on my softkeyboard or press the button, it just says "<code>RaadHetGetal stopped</code>." </p>
  
  <p>Any ideas? If you need to see any more, just say it.</p>