Android Question Going through views with for or while loop

mare1980k1

Member
Licensed User
Longtime User
I am looking for a way to go through views with some loop. I have bunch of checkbox views like (CheckBox1, CheckBox2,CheckBox3..) How can you do something like:

B4X:
for i=1 to i=100
'CheckBox(i).visible=false
Next
 

mare1980k1

Member
Licensed User
Longtime User
For Each V As View In Activity.GetAllViewsRecursive
' here check the type of the view or its tag to distinguish the views
V.Visible = False
Next

It is better to put the views in a panel and then use Panel1.GetAllViewsRecursive

I already have them in a panel, but I have also buttons and others stuff there, it is panel on a scrollview. But your suggestions resolves that, thank you. :)
 
Upvote 0
Top