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
TextView text = new TextView(context); text.setTextColor(Color.parseColor("any hex value of a color"));
Above code is working on my side. Here text is a TextView on which color is needed to be set.
text