In my Android app, when I try to use this code:
EditText et = (EditText) findViewById(R.id.editText);
String s = et.getText().toString();
my app crashes. This event is triggered from a dialog positive click.
How can I access the text of an EditText without my app crashing?