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
For providing rgb values: text.setTextColor(Color.rgb(200,0,0)); For parsing the color from a hex value: text.setTextColor(Color.parseColor("#FFFFFF"));
text.setTextColor(Color.rgb(200,0,0));
text.setTextColor(Color.parseColor("#FFFFFF"));