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
From API 23 onward, getResources().getColor() is deprecated.
getResources().getColor()
Use this instead:
textView.setTextColor(ContextCompat.getColor(getApplicationContext(), R.color.color_black));