mirror of
https://github.com/revanced/Apktool.git
synced 2025-01-26 19:57:34 +01:00
Fixed attrib switched with <item> bug. xlif data w/ more than one fix ongoing.
This commit is contained in:
parent
df7e469ff4
commit
d82ace7cfe
@ -58,6 +58,15 @@ public abstract class ResScalarValue extends ResValue
|
|||||||
throws IOException, AndrolibException {
|
throws IOException, AndrolibException {
|
||||||
String type = res.getResSpec().getType().getName();
|
String type = res.getResSpec().getType().getName();
|
||||||
boolean item = ! "reference".equals(mType) && ! type.equals(mType);
|
boolean item = ! "reference".equals(mType) && ! type.equals(mType);
|
||||||
|
|
||||||
|
String body = encodeAsResXmlValue();
|
||||||
|
|
||||||
|
/* check for resource reference */
|
||||||
|
if (body.contains("@")){
|
||||||
|
item = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* check for using attrib as node or item */
|
||||||
String tagName = item ? "item" : type;
|
String tagName = item ? "item" : type;
|
||||||
|
|
||||||
serializer.startTag(null, tagName);
|
serializer.startTag(null, tagName);
|
||||||
@ -68,7 +77,6 @@ public abstract class ResScalarValue extends ResValue
|
|||||||
|
|
||||||
serializeExtraXmlAttrs(serializer, res);
|
serializeExtraXmlAttrs(serializer, res);
|
||||||
|
|
||||||
String body = encodeAsResXmlValue();
|
|
||||||
if (! body.isEmpty()) {
|
if (! body.isEmpty()) {
|
||||||
serializer.ignorableWhitespace(body);
|
serializer.ignorableWhitespace(body);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user