In XML, we can set a text color by the textColor attribute, like android:textColor=\"#FF0000\". But how do I change it by coding?
textColor
android:textColor=\"#FF0000\"
I tried s
I normally do this for any views:
myTextView.setTextColor(0xAARRGGBB);
where
AA defines alpha (00 for transparent, FF for opaque)
RRGGBB defines the normal HTML color code (like FF0000 for red).