Android Question Access B4XRadioButton (or any B4XView) on a layout without a panel

jimseng

Active Member
Licensed User
Longtime User
I have a B4XMainpage with a layout without a panel and some B4Xviews. Three of them are radio buttons and I am trying to work out how to get which one is checked. I have seen how to do it if there is a panel as the parent but can't find a way of getting all the views of a page without a panel.
 

Sagenut

Expert
Licensed User
Longtime User
With
B4X:
Root.GetAllViewsRecursive
 
Upvote 0

LucaMs

Expert
Licensed User
Longtime User
I have a B4XMainpage with a layout without a panel and some B4Xviews. Three of them are radio buttons and I am trying to work out how to get which one is checked. I have seen how to do it if there is a panel as the parent but can't find a way of getting all the views of a page without a panel.
B4X:
For Each v As B4XView In Root.GetAllViewsRecursive
    If v.Tag Is B4XRadioButton Then
        Dim RB As B4XRadioButton = v.Tag
        Log(RB.Tag & "is checked: " & RB.Checked) 'This tag is the one you set in the Designer.
    End If
Next
 
Upvote 0
Top