I'm trying to access each of the values in colors.xml, but the int (hex) values in the R/color class doesn't match corresponding values that are defined in colors.xml. Here are some sample values:
R/color (all of which starts with 0x7f0400...):
public static final int AliceBlue=0x7f04002d;
public static final int AntiqueWhite=0x7f040023;
public static final int Aqua=0x7f04007d;
public static final int Aquamarine=0x7f040062;
public static final int Azure=0x7f04002b;
...
But in colors.xml (all of which starts with #00...):
<color name="AliceBlue">#F0F8FF</color>
<color name="AntiqueWhite">#FAEBD7</color>
<color name="Aqua">#00FFFF</color>
<color name="Aquamarine">#7FFFD4</color>
<color name="Azure">#F0FFFF</color>
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…