Reputation: 169
Using this line to get the text in an EditText field to get the string to translate
texttotranslate = (String) txtText.toString();
I get errors of this type:
09-15 15:20:13.311: E/ATTN:(27603): android.widget.EditText{421dbeb8 VFED..CL .F...... 0,190-720,260 #7f0b0029 app:id/txtText}- your input
where
"(27603): android.widget.EditText{421dbeb8 VFED..CL .F...... 0,190-720,260 #7f0b0029 app:id/txtText"
is the value found in texttotranslate. The actual input was supposed to be the word "yes".
Has anyone seen errors of this type? Am I using toString() incorrectly?
Upvotes: 0
Views: 65
Reputation: 11
In java you need to use the getter method getText()
to get the text property, like this:
(String)txtText.getText().toString();
Upvotes: 1