fix(xml): use parent attibute only for styles (PR #1815)

This commit is contained in:
nitram84
2023-04-10 19:34:17 +02:00
committed by GitHub
parent 0421ad80c1
commit 1ad6527de5
@@ -123,14 +123,15 @@ public class ResXmlGen {
if (formatValue != null) {
cw.add("\" format=\"").add(formatValue);
}
cw.add("\"");
} else {
cw.add(ri.getKeyName()).add('\"');
cw.add(ri.getKeyName());
}
cw.add(" parent=\"");
if (ri.getParentRef() != 0) {
String parent = vp.decodeValue(TYPE_REFERENCE, ri.getParentRef());
cw.add(parent);
if (ri.getTypeName().equals("style") || ri.getParentRef() != 0) {
cw.add("\" parent=\"");
if (ri.getParentRef() != 0) {
String parent = vp.decodeValue(TYPE_REFERENCE, ri.getParentRef());
cw.add(parent);
}
}
cw.add("\">");