Hi guys, first of all, Happy Easter to everybody!
I always used FindViewByTag to retrieve a standard view inside a container.
With non standard views (such, BUT NOT ONLY: CustomListViews) this functions seems not to work.
Is there a standard way to achieve my goal? I have to load several layouts inside an activity (one at a time, but they have different views inside).
In this code, the IS statement is useless...
B4X:
For Each V As View In P.GetAllViewsRecursive
If V Is CustomListView Then
Return true '<-- This line is never reached !
End If
Next
Thank you Erel, but I do not know, in my code, wich layout is loaded each time... Customlistviews can be 1, 2 or 3 (why not 10 ?) for each Activity. I would use also other non-standard custom views... I need a generic approach. (I use this Activity to view db data, bounded to an entity/map by tag values...) I really use few lines of code, always the same, but several layouts.
At the moment I forced my layouts to have only customlistviews named clv1,clv2 or clv3, and declared as global, (and so on) but it is a "dirty" approach.