I wan't to create a layout from code and set a number of properties, color for a button as one. Data is fetched from a SqLite table and buttons in this case is created ok if 'btncolor' is excluded. I can't figure out how to pass the HEX value for color ( like 0xFF7FFFD4) to sub below. (0xFF7FFFD4 is saved as BLOB in sqlite, is that correct??)
(NumberFormatException) java.lang.NumberFormatException: For input string: "0xFF7FFFD4"
Can someone point me to a solution
(NumberFormatException) java.lang.NumberFormatException: For input string: "0xFF7FFFD4"
B4X:
Public Sub Initialize(act As Activity, left As Int, top As Int, width As Int, height As Int, name As String, label As String,btncolor As ???????????)
mName = name
mButton.Initialize("button")
mButton.Text = label
mButton.Color=btncolor
act.AddView(mButton, left, top, width, height)
End Sub