I tried to make one or another button change its colour using code. When the button click is fired, the corner radius is lost. How can I make the buttons not losing their rounded corners?
B4X:
#Region Project Attributes
#ApplicationLabel: Buttons
#VersionCode: 1
#VersionName:
#SupportedOrientations: portrait
#CanInstallToExternalStorage: False
#End Region
#Region Activity Attributes
#FullScreen: False
#IncludeTitle: True
#End Region
Sub Process_Globals
End Sub
Sub Globals
Private btnOff As Button
Private btnOn As Button
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("1")
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub btnOn_Click
btnOn.Color = Colors.RGB(0, 255, 0)
btnOff.Color = Colors.RGB(105, 105, 105)
End Sub
Sub btnOff_Click
btnOn.Color = Colors.RGB(105, 105, 105)
btnOff.Color = Colors.RGB(255, 20, 147)
End Sub