Apologies if this is a duplicate question but I'm struggling to find the syntax needed to do what I want.
I have an attributes file in my resources where i store a bunch of different colours, and have been settings them in xml like so:
android:textColor="?attr/textcolor"
Say I have a TextView called textView in my Java. How can I do the same task programmatically? I'm thinking it must be something similar to:
textView.setTextColor(getResources().getColor(...))
But I can't figure out exactly what I need to write.
Cheers