I want to change the color of many textView
at once programatically. Ideally instead of referencing each textView
individually I would like to alter for example a color in colors.xml (with each textView
having this color).
Here is some code to help illustrate:
luminance = (0.2126f * RGBRed) + (0.7152f * RGBGreen) + (0.0722f * RGBBlue);
if(luminance >= 160) {
//change color of multiple textViews to black
} else {
//change color of multiple textViews to white
}
Is there an easy way to do this or do I have to reference each textView
?