Android Question Exactly verify the type of control

Roberto P.

Well-Known Member
Licensed User
Longtime User
I have found that there are EditText controls, Label and Check boxes that come from the same class. So doing the following check I see that a check box is also a label!

Is there a way to check precisely the type of control via code?

here is a small example.

Dim v As View = m_chkDisattivo

If v Is Label Then
Log("Label") 'OK
End If

If v Is EditText Then
Log("text")
End If

If v Is CheckBox Then
Log("chek") 'OK
End If


Thanks so much
 

Roberto P.

Well-Known Member
Licensed User
Longtime User
hello Erel,
I thank you for your reply.
you can tell me where can I find an example to do the check with Java.
regards
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…