It seems I can\'t figure out how to get the text string out of EditText
.
I want to use the text from the EditText
at pressing the button.
l
EditText txtDescription =
(EditText) layout.findViewById(R.id.txtDescription);
String message = txtDescription.getText().toString();
Try this :
EditText edt = (EditText)findViewById(R.id.edittext);
String xyz = edt.getText().toString();
Solved the problem myself:
final EditText edittextDescription = (EditText) findViewById(R.id.edittext);
must be
final EditText edittextDescription = (EditText)layout.findViewById(R.id.txtDescription);
And then I can do this to get the string
String s = edittext.getText().toString();