I have a custom View that uses Paint and Canvas to draw objects. My question is how to set:
int color = R.color.white;
<?xml version="1.0" encoding="utf-8"?>
Something like this:
int myColor = context.getResources().getColor(com.example.test.R.color.white); paint.setColor(myColor);
setColor() method takes a color number as an
int value, but not a resource id which is an
int as well.