There are several ways to achieve it.
You can add all those buttons to a list and then go over the list.
If you want to hide all buttons you can use Is:
B4X:
[COLOR=Black]For[/COLOR][COLOR=Black] i = [/COLOR][COLOR=Black]0[/COLOR][COLOR=Black]To[/COLOR][COLOR=Black] Activity.NumberOfViews - [/COLOR][COLOR=Black]1[/COLOR][COLOR=Black]
If[/COLOR][COLOR=Black] Activity.GetView(i) Is [/COLOR][COLOR=Black]Button[/COLOR][COLOR=Black] Then[/COLOR][COLOR=Black]
Activity.GetView(i).Visible = False
[/COLOR][COLOR=Black]End [/COLOR][COLOR=Black]If
[/COLOR][COLOR=#0000ff][COLOR=Black]Next
[/COLOR] Or you can write something like:
B4X:
Sub Activity_Create(FirstTime As Boolean)
For i = 0 To Activity.NumberOfViews - 1
Dim tag As String
tag = Activity.GetView(i).Tag
If tag.StartsWith("butt") Then Activity.GetView(i).Visible = False
'if you want to access a button specific method:
' If tag.StartsWith("butt") Then
' Dim b As Button
' b = Activity.GetView(i)
' b.
' End If
Next
End Sub