Properly handle style with dot in its name and without a parent style.

This commit is contained in:
Ryszard Wiśniewski 2013-06-05 18:45:17 +02:00
parent 09a978e015
commit 38de56697a
2 changed files with 4 additions and 1 deletions

View File

@ -47,7 +47,9 @@ public class ResStyleValue extends ResBagValue implements
serializer.attribute(null, "name", res.getResSpec().getName());
if (!mParent.isNull()) {
serializer.attribute(null, "parent", mParent.encodeAsResXmlAttr());
}
} else if (res.getResSpec().getName().indexOf('.') != -1) {
serializer.attribute(null, "parent", "");
}
for (int i = 0; i < mItems.length; i++) {
ResResSpec spec = mItems[i].m1.getReferent();

View File

@ -7,4 +7,5 @@
<style name="TextAppearance.EditEvent_Button" parent="@style/TextAppearance.EditEvent_Label">
<item name="android:textColor">#ff777777</item>
</style>
<style name="Foo.Bar" parent=""/>
</resources>