fixed problem with <items> showing up in colors.xml

This commit is contained in:
Connor Tumbleson 2013-05-12 07:20:35 -05:00
parent ac745599ed
commit aa20036307
2 changed files with 9 additions and 6 deletions

View File

@ -70,10 +70,12 @@ public abstract class ResScalarValue extends ResValue implements
String body = encodeAsResXmlValue(); String body = encodeAsResXmlValue();
// check for resource reference // check for resource reference
if (!type.equalsIgnoreCase("color")) {
if (body.contains("@")) { if (body.contains("@")) {
if (!res.getFilePath().contains("string")) { if (!res.getFilePath().contains("string")) {
item = true; item = true;
} }
}
} }
// check for using attrib as node or item // check for using attrib as node or item

View File

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources> <resources>
<color name="test_color1">#ff123456</color> <color name="test_color1">#ff123456</color>
<item type="color" name="test_color2">@*android:color/white</item> <color name="test_color2">@*android:color/white</color>
<color name="test_color3">#00000000</color>
</resources> </resources>