chetsachdeva
04/04/2018, 7:11 PMString
like "0xFF3F51B5"
and I need to use it in button.setBackgroundColor(int: Int)
. I’ve tried Integer.decode(hexString)
and hexString.toInt(radix = 16)
but no success. Looks like there’s an overflow:
https://youtrack.jetbrains.com/issue/KT-4749
Please help. Thanks 🙂Michael
04/04/2018, 7:25 PMInt
can hold is 7FFFFFFF. What’s the source of your string? It looks like it might be “Red Green Blue alpha” - but probably the button doesn’t accept alpha?chetsachdeva
04/04/2018, 7:28 PM