B4X:
Sub SetColorStateList(Btn As Label,Pressed As Int,Enabled As Int)
Dim States(2,1) As Int
States(0,0) = 16842919 'Pressed
States(1,0) = 16842910 'Enabled
Dim CSL As JavaObject
CSL.InitializeNewInstance("android.content.res.ColorStateList",Array(States,Array As Int(Pressed, Enabled)))
Dim B1 As JavaObject = Btn
B1.RunMethod("setTextColor",Array As Object(CSL))
End Sub