42
votes

setBackgroundColor() only takes ints. I don't really know what int equals to what color. Is there a simple way to convert a string like #2222FF on runtime into an int?

1

1 Answers

107
votes
int color = Color.parseColor("#2222FF");