tags:

views:

18

answers:

1

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?

+2  A: 
int color = Color.parseColor("#2222FF");
Konstantin Burov