fix(res): resolve int hex attributes

This commit is contained in:
nitram84
2023-04-07 13:44:13 +02:00
committed by skylot
parent 92b49ec2b5
commit 058a5e3bb2
@@ -185,6 +185,17 @@ public class ResXmlGen {
// ignore
}
}
if (dataType == ParserConstants.TYPE_INT_HEX && nameStr != null) {
try {
int intVal = Integer.decode(valueStr);
String newVal = ManifestAttributes.getInstance().decode(nameStr.replace("android:attr.", ""), intVal);
if (newVal != null) {
valueStr = newVal;
}
} catch (NumberFormatException e) {
// ignore
}
}
}
switch (typeName) {
case "attr":