How do I change the font color of a TextView in a ListView from an xml file item? Android
Depends on the value:
If the value of pay is higher, the color of 200 is green.
If the value of pay is low, the color of 100 is red.
It changes color every second because I have the xml file link from the browser
and update the XML file every second.
I like this color because the link in my xml file refreshes it in seconds and changes the color, depending on whether it’s high or low.
If you mean XML files for XML parsing, try the following
When you place text from an xml file in a ListView, get the colors from the xml file and parse them as follows
String txt = “
<font color=#408cc4> “+”The text that needs to be printed here “+””;
= the color you need