I have variable:
String colorName = "BLUE";
I want to set this color to the paint in android application. It should be something like this:
paint.setColor ("Color." + colorName);
But I receive the error warning because argument for setColor() function should be int.
Any ideas?Thanks.
Try this:
EDIT: as i see, you get your Color as a string.
So you have to check, what color it is and then set your ‘colorName’ variable.
Something like this: