Android Question Identify CustomView

stevel05

Expert
Licensed User
Longtime User
Is there a way in code to identify that a view is a CustomView?
 

stevel05

Expert
Licensed User
Longtime User
Thanks Klaus,

I'd then need to keep a manual index of the CustomViews. It's an option, but I was hoping for a more direct solution like:

Object Is CustomView, which I know doesn't work. Or to be able to pull a specific field from it with JavaObject maybe, I just can't find one.
 
Upvote 0

stevel05

Expert
Licensed User
Longtime User
Yes, but if i had two customviews in an app, I'd get:

b4a,example.customview1 and b4a.example.customview2 and I wouldn't know which one is which without an index.

Whereas GetView(EditText1) returns android.widget.EditText, so I'd know immediately that it is an EditText.
 
Upvote 0

stevel05

Expert
Licensed User
Longtime User
Sorry, that was not a good explanation.

What I meant was that without an index of CustomViews, I wouldn't know that the viewname returned was a customview.
 
Upvote 0

stevel05

Expert
Licensed User
Longtime User
Yes, looks like that's going to be it. I'll probably add them to a list then do an indexof search as I only really need to know if it is a custom view or not.

Thanks
 
Upvote 0
Top