+ResIdValue.serializeToXml

This commit is contained in:
Ryszard Wiśniewski 2010-03-24 10:47:34 +01:00
parent d626afaf7e
commit a82506892d

View File

@ -17,8 +17,19 @@
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 Ryszard Wiśniewski <brut.alll@gmail.com>
*/
public class ResIdValue extends ResValue {
public class ResIdValue extends ResValue implements ResXmlSerializable {
public void serializeToXml(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");
}
}