Android Question Custom dialog 2017 - color of system title

peacemaker

Expert
Licensed User
Longtime User
HI, All

How to get (or better and change) the background color of the system part of the custom dialog - container of the title ?

Buttons are controllable:
B4X:
    Dim but As Button = DetailsDialog.GetButton(DialogResponse.POSITIVE)
    Dim container As Panel = but.Parent
    container.Color = Colors.White

But what about the title ?
 

peacemaker

Expert
Licensed User
Longtime User
SOLVED with a trick:
B4X:
    Dim but As Button = DetailsDialog.GetButton(DialogResponse.POSITIVE)
    Dim container As Panel = but.Parent
    container.Color = Colors.White
    Color_All(container)
    Dim container1 As Panel = container.Parent
    container1.Color = Colors.White
    Color_All(container1)
    Dim container2 As Panel = container1.Parent
    container2.Color = Colors.White
    Color_All(container2)
End sub

Sub Color_All(p As Panel)
    For Each v As View In p.GetAllViewsRecursive
        v.Color = Colors.White
    Next
End Sub
 
Upvote 0
Top