Say for example I define 3 colours in XML code:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="red">#af0000</color>
<color name="green">#00af00</color>
<color name="blue">#0092ed</color>
</resources>
Now I want to add a fourth colour which I will call ‘selected_colour’ and I want its value to be one of the three colours I have already defined in XML, AND I want to define this assignment in XML. Is this possible?
As far as I know, you cannot do such thing and change its value dynamically. Instead set a static Color object in which you set the current selected color and use it whenever you want.