java - How do I use my own colors in android XML -


I have an XML file created in the Res / value folder and try to reference it by typing it

Android: Background = "@color / red"

And it does not work.

I do not even have the advantage of putting this file in the folder .

color view resources for example, res / values In the / whatever.xml @color / name , not @color / name

with: <: / P>

  & lt; Color name = "your_color_name" & gt; # 12345678 & lt; / Color & gt;   

Then in a layout xml:

  android: background = "@ color / your_color_name"    < / Html>

Comments

Popular posts from this blog

python - how we can use ajax() in views.py in django? -

matlab - Using loops to get multiple values into a cell -

python - Sequence Pattern recognition with Pybrain -