Sub Globals
'These global variables will be redeclared each time the activity is created.
Private Button1, Button2, Button3, Button4 As B4XView
Private xui As XUI
Private Panel1 As B4XView
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("Layoutb")
Panel1.SetColorAnimated(200, xui.Color_DarkGray, xui.Color_LightGray)
For Each b As B4XView In Panel1.GetAllViewsRecursive
' For Each b As B4XView In Activity.GetAllViewsRecursive 'this works too
If b Is Button Then
b.SetColorAndBorder(xui.Color_Black, 4dip, xui.Color_Cyan, 10dip) 'need to use the B4XViews properties
b.TextColor =xui.Color_White
' b.col'the rest . You cannot use colorDrawable
End If
Next
End Sub