0

I am an android beginner. I am stuck up with a problem. I'm having three EditTexts to which I need to do validation. When I'm doing validation, the EditText is having a value even though I didn't enter any value while running the application. To check whether which value is present, I printed the values using System.out.println()

This is printed in the logcat

08-06 06:53:12.235: I/System.out(3801): 
android.widget.EditText{40fca498 VFED..CL......I. 0,254-480,299 #7f05000c app:id/vTypeModel}
android.widget.EditText{40fc9f58 VFED..CL ......I. 0,180-480,225 #7f05000b app:id/vTypeMake}   
android.widget.EditText{40fccd48 VFED..CL .F....I. 0,106-480,151 #7f05000a app:id/vTypeNumber}

Where did these values come from? Please help me solve this issue.

Thanks in advance :)

4

1 回答 1

1

我想你正在使用System.out.println(EditText object)

如果是这种情况,那么这不是object正在打印的内部值,您需要使用object.getText().toString()

否则发布您的代码。

于 2013-08-06T07:31:48.887 回答