
org.robolectric.res.RawResourceLoader 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 RawResourceLoader {
private final ResourcePath resourcePath;
public RawResourceLoader(ResourcePath resourcePath) {
this.resourcePath = resourcePath;
}
public void loadTo(ResBundle rawResourceFiles) {
if (resourcePath.rawDir != null) {
FsFile[] files = resourcePath.rawDir.listFiles();
if (files != null) {
for (FsFile file : files) {
String fileBaseName = file.getBaseName();
rawResourceFiles.put("raw", fileBaseName, file, new XmlLoader.XmlContext(resourcePath.getPackageName(), file));
}
}
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy