Loading

Wednesday, February 9, 2011

How to retrieve the String from EditText

The getText() method of EditText return a object of Editable, not String. In order to retrieve the text of EditText, toString() of Editable can be used.

 EditText myEditText = (EditText)findViewById(R.id.myedittext);
...
String stringEditText = myEditText.getText().toString();


SHARE TWEET

Thank you for reading this article How to retrieve the String from EditText With URL http://x-tutorials.blogspot.com/2011/02/how-to-retrieve-string-from-edittext.html. Also a time to read the other articles.

0 comments:

Write your comment for this article How to retrieve the String from EditText above!