
org.robolectric.res.OpaqueFileLoader Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of robolectric-resources Show documentation
Show all versions of robolectric-resources Show documentation
An alternative Android testing framework.
package org.robolectric.res;
public class OpaqueFileLoader extends XmlLoader {
private final ResBunch resBunch;
private final String attrType;
public OpaqueFileLoader(ResBunch resBunch, String attrType) {
this.resBunch = resBunch;
this.attrType = attrType;
}
@Override
protected void processResourceXml(FsFile xmlFile, XpathResourceXmlLoader.XmlNode xmlNode, XmlContext xmlContext) throws Exception {
resBunch.put(attrType, xmlFile.getBaseName(), new FileTypedResource<>(xmlFile.getPath(), ResType.LAYOUT), xmlContext);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy