Skip to content

Commit

Permalink
fix(xml): use parent attibute only for styles (PR #1815)
Browse files Browse the repository at this point in the history
  • Loading branch information
nitram84 committed Apr 10, 2023
1 parent 0421ad8 commit 1ad6527
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions jadx-core/src/main/java/jadx/core/xmlgen/ResXmlGen.java
Original file line number Diff line number Diff line change
Expand Up @@ -123,14 +123,15 @@ private void addValue(ICodeWriter cw, ResourceEntry ri) {
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("\">");

Expand Down

0 comments on commit 1ad6527

Please sign in to comment.