android - 2 Colors Defined In XML - Is It Possible In XML Code For One Color To Refer To The Other? -
For example, I define 3 colors in the XML code:
Lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; Resources & gt; & Lt; Color name = "red" & gt; # Af0000 & lt; / Color & gt; & Lt; Color name = "green" & gt; # 00af00 & lt; / Color & gt; & Lt; Color name = "blue" & gt; # 0092ed & lt; / Color & gt; & Lt; / Resources & gt; Now I want to add a quarter color, which I would call 'selected_colour' and I should have one of the three colors that I have already defined in XML, and I Is it possible to define this assignment in XML?
As far as I know, you can not do such a thing and the speed is dynamically can change. Instead set a constant color object in which you set the currently selected color and use it whenever you want.
Comments
Post a Comment