Android Question Get list of widgets on a screen (B4X pages)?

App Dude

Active Member
Licensed User
Longtime User
I'm using B4Xpages and would like to programmatically get the list of all widgets on a screen (so I can change colors within the app).
I would need it to give me a list (handles?) of all the widgets, and I should be able to check the type of widget. So for example I can change editText fields to one color and labels to a different color.
Is this possible?

Thanks.
 

DonManfred

Expert
Licensed User
Longtime User
Inform about B4XView.

B4X:
Private Sub B4XPage_Created (Root1 As B4XView)
    Root = Root1
    Root.LoadLayout("MainPage")
    For Each vw As B4XView In Root.GetAllViewsRecursive
        Log($"${vw}"$)
    Next
End Sub
 
Upvote 1
Top