Valli
Valli

Reputation: 1

EditText having a value before entering some text

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 :)

Upvotes: 0

Views: 305

Answers (1)

R4chi7
R4chi7

Reputation: 863

I think you are using System.out.println(EditText object)

If that's the case, then that is not the value inside object that is being printed, you need to use object.getText().toString()

Else post your code.

Upvotes: 1

Related Questions