This is a modified version of the B4XSwitch class wich allows you to set the On,Off and Thumbcolors in code.
Just replace it inside your XUI Views.b4xlib. You can also rename the class to use it beside the official XUI Views
Maybe this can be added in future official updates
Just replace it inside your XUI Views.b4xlib. You can also rename the class to use it beside the official XUI Views
Maybe this can be added in future official updates
B4X:
B4XSwitch1.OnColor=Theme.SelectionBackground
B4XSwitch1.OffColor=Theme.Disabled
B4XSwitch1.ThumbColor=Theme.AccentColor
Attachments
Last edited: