Ejemplo n.º 1
0
  public Duo<ResFileDecoder, AXmlResourceParser> getResFileDecoder() {
    ResStreamDecoderContainer decoders = new ResStreamDecoderContainer();
    decoders.setDecoder("raw", new ResRawStreamDecoder());
    decoders.setDecoder("9patch", new Res9patchStreamDecoder());

    AXmlResourceParser axmlParser = new AXmlResourceParser();
    axmlParser.setAttrDecoder(new ResAttrDecoder());
    decoders.setDecoder("xml", new XmlPullStreamDecoder(axmlParser, getResXmlSerializer()));

    return new Duo<ResFileDecoder, AXmlResourceParser>(new ResFileDecoder(decoders), axmlParser);
  }
Ejemplo n.º 2
0
  public Duo<ResFileDecoder, AXmlResourceParser> getManifestFileDecoder() {
    ResStreamDecoderContainer decoders = new ResStreamDecoderContainer();

    AXmlResourceParser axmlParser = new AXmlResourceParser();

    decoders.setDecoder("xml", new XmlPullStreamDecoder(axmlParser, getResXmlSerializer()));

    return new Duo<ResFileDecoder, AXmlResourceParser>(new ResFileDecoder(decoders), axmlParser);
  }