#Region Project Attributes
#ApplicationLabel: SwitchBTN-Ex
#VersionCode: 1
#VersionName:
'SupportedOrientations possible values: unspecified, landscape or portrait.
#SupportedOrientations: unspecified
#CanInstallToExternalStorage: False
#End Region
'#AdditionalRes: ..\Resource
#Region Activity Attributes
#FullScreen: False
#IncludeTitle: True
#End Region
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Private SwitchButton1 As SwitchButton
Private SwitchButton2 As SwitchButton
Private SwitchButton3 As SwitchButton
Private SwitchButton4 As SwitchButton
Private SwitchButton5 As SwitchButton
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
Activity.LoadLayout("Layout1")
Dim States(3,1) As Int
States(0,0) = 16842919 'Pressed
States(1,0) = 16842910 'Enabled
States(2,0) = -16842910 'Disabled
Dim Color(3) As Int = Array As Int(Colors.Blue,Colors.Cyan,Colors.LightGray)
Dim CSL As JavaObject
CSL.InitializeNewInstance("android.content.res.ColorStateList",Array As Object(States,Color))
SwitchButton1.ThumbColor = CSL
SwitchButton1.ThumbDrawableRes = "flyme_thumb_drawable"
SwitchButton1.BackDrawableRes = "flyme_back_drawable"
SwitchButton2.BackDrawableRes = "ios_back_drawable"
SwitchButton3.ThumbDrawableRes = "miui_thumb_drawable"
SwitchButton3.BackDrawableRes = "miui_back_drawable"
SwitchButton4.ThumbDrawableRes = "icon_github"
SwitchButton5.ThumbDrawableRes = "ios_back_drawable"
'SwitchButton1.Enabled = False
End Sub
Sub Switch_onCheckedChanged(checked As Boolean)
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub