mirror of
https://github.com/revanced/Apktool.git
synced 2024-12-13 14:27:46 +01:00
Added support for serializing scalar values to "item" tag.
This commit is contained in:
parent
6634963ab8
commit
99ec06d40c
@ -37,8 +37,14 @@ public abstract class ResScalarValue extends ResValue
|
|||||||
|
|
||||||
public void serializeToXml(XmlSerializer serializer, ResResource res)
|
public void serializeToXml(XmlSerializer serializer, ResResource res)
|
||||||
throws IOException, AndrolibException {
|
throws IOException, AndrolibException {
|
||||||
String tagName = res.getResSpec().getType().getName();
|
String type = res.getResSpec().getType().getName();
|
||||||
|
boolean item = ! type.equals(mType);
|
||||||
|
String tagName = item ? "item" : type;
|
||||||
|
|
||||||
serializer.startTag(null, tagName);
|
serializer.startTag(null, tagName);
|
||||||
|
if (item) {
|
||||||
|
serializer.attribute(null, "type", type);
|
||||||
|
}
|
||||||
serializer.attribute(null, "name", res.getResSpec().getName());
|
serializer.attribute(null, "name", res.getResSpec().getName());
|
||||||
serializer.text(toResXmlFormat());
|
serializer.text(toResXmlFormat());
|
||||||
serializer.endTag(null, tagName);
|
serializer.endTag(null, tagName);
|
||||||
|
Loading…
Reference in New Issue
Block a user