Reputation: 221
I'm trying to make a text view change its text colour depending on what the value is in an XML file.
I've managed to get an XML parser which I vaguely know what it is doing, and I'm writing the elements value to the log.
Is this even possible or will I have to store the results from the XML parse first before I can use them to change the text views text colour?
Upvotes: 1
Views: 930
Reputation: 1809
It's fully possible :)
yourTextView.setTextColor(Color.parseColor("#FFFFFF"));
where "#FFFFFF" of course is the color value string from your XML.
Upvotes: 1