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
if you want to give color code directly then use
textView.setTextColor(Color.parseColor("#ffffff"));
or if you want to give color code from colors folder then use
textView.setTextColor(R.color.white);