I am receiving hex color values from a server (in this form, #xxxxxx , example #000000 for black)
#xxxxxx
#000000
How do I convert this to an integer value
The real answer is to use:
Color.parseColor(myPassedColor) in Android, myPassedColor being the hex value like #000 or #000000 or #00000000.
Color.parseColor(myPassedColor)
myPassedColor
hex
#000
#00000000
However, this function does not support shorthand hex values such as #000.