Sub Globals
Dim CheckBox1 As CheckBox
End Sub
Sub Activity_Create(FirstTime As Boolean)
CheckBox1.Initialize("check")
Activity.AddView(CheckBox1,30%x,40%y,20%x,20%y)
SetColorTintList(CheckBox1,Colors.Red,Colors.White,Colors.Gray)
End Sub
Sub SetColorTintList(CB As CheckBox,Checked As Int,Enabled As Int,Disabled As Int)
Dim States(3,1) As Int
States(0,0) = 16842912 'Checked
States(1,0) = 16842910 'Enabled
States(2,0) = -16842910 'Disabled
Dim Color(3) As Int = Array As Int(Checked,Enabled,Disabled)
Dim CSL As JavaObject
CSL.InitializeNewInstance("android.content.res.ColorStateList",Array As Object(States,Color))
Dim CB1 As JavaObject = CB
CB1.RunMethod("setButtonTintList",Array As Object(CSL))
End Sub