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

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -