diff --git a/apktool-lib/src/main/java/android/util/TypedValue.java b/apktool-lib/src/main/java/android/util/TypedValue.java index 4179f7e5..a11a176a 100644 --- a/apktool-lib/src/main/java/android/util/TypedValue.java +++ b/apktool-lib/src/main/java/android/util/TypedValue.java @@ -43,6 +43,8 @@ public class TypedValue { /** The data field holds a complex number encoding a fraction * of a container. */ public static final int TYPE_FRACTION = 0x06; + + public static final int TYPE_LAYOUT = 0x07; /** Identifies the start of plain integer values. Any type value * from this to {@link #TYPE_LAST_INT} means the diff --git a/apktool-lib/src/main/java/brut/androlib/res/data/value/ResLayoutValue.java b/apktool-lib/src/main/java/brut/androlib/res/data/value/ResLayoutValue.java new file mode 100644 index 00000000..0938d3aa --- /dev/null +++ b/apktool-lib/src/main/java/brut/androlib/res/data/value/ResLayoutValue.java @@ -0,0 +1,35 @@ +/** + * Copyright 2011 Ryszard Wiśniewski + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package brut.androlib.res.data.value; + +import brut.androlib.AndrolibException; +import brut.androlib.res.data.ResResource; +import java.io.IOException; +import org.xmlpull.v1.XmlSerializer; + +/** + * + * @author peaches + */ +public class ResLayoutValue { + + public void serializeToResValuesXml(XmlSerializer serializer, ResResource res) throws IOException, AndrolibException { + serializer.startTag(null, "item"); + serializer.attribute(null, "type", res.getResSpec().getType().getName()); + serializer.attribute(null, "name", res.getResSpec().getName()); + serializer.endTag(null, "item"); + } +} \ No newline at end of file