HomeSort by relevance Sort by last modified time
    Searched refs:resourceTable (Results 1 - 25 of 28) sorted by null

1 2

  /external/robolectric-shadows/resources/src/main/java/org/robolectric/res/
ResourceTableFactory.java 15 PackageResourceTable resourceTable = new PackageResourceTable("android");
18 addRClassValues(resourceTable, resourcePath.getRClass());
19 addMissingStyleableAttributes(resourceTable, resourcePath.getRClass());
22 addRClassValues(resourceTable, resourcePath.getInternalRClass());
23 addMissingStyleableAttributes(resourceTable, resourcePath.getInternalRClass());
26 parseResourceFiles(resourcePath, resourceTable);
28 return resourceTable;
41 PackageResourceTable resourceTable = new PackageResourceTable(packageName);
45 addRClassValues(resourceTable, resourcePath.getRClass());
50 parseResourceFiles(resourcePath, resourceTable);
    [all...]
RoutingResourceTable.java 11 public class RoutingResourceTable implements ResourceTable {
18 for (PackageResourceTable resourceTable : resourceTables) {
19 this.resourceTables.put(resourceTable.getPackageName(), resourceTable);
57 for (PackageResourceTable resourceTable : resourceTables.values()) {
58 resourceTable.receive(visitor);
68 for (PackageResourceTable resourceTable : resourceTables.values()) {
69 if (resourceTable.getPackageIdentifier() == ResourceIds.getPackageIdentifier(resId)) {
70 return resourceTable;
85 PackageResourceTable resourceTable = resourceTables.get(namespace)
    [all...]
StaxLoader.java 8 protected final PackageResourceTable resourceTable;
12 public StaxLoader(PackageResourceTable resourceTable, String attrType, ResType resType) {
13 this.resourceTable = resourceTable;
RawResourceLoader.java 12 public void loadTo(PackageResourceTable resourceTable) {
13 load(resourceTable, "raw");
14 load(resourceTable, "drawable");
17 public void load(PackageResourceTable resourceTable, String folderBaseName) {
24 loadRawFiles(resourceTable, folderBaseName, dir);
28 private void loadRawFiles(PackageResourceTable resourceTable, String resourceType, FsFile rawDir) {
41 resourceTable.addResource(resourceType, fileBaseName,
43 new XmlContext(resourceTable.getPackageName(), file, qualifiers)));
DrawableResourceLoader.java 9 private final PackageResourceTable resourceTable;
11 DrawableResourceLoader(PackageResourceTable resourceTable) {
12 this.resourceTable = resourceTable;
62 XmlContext fakeXmlContext = new XmlContext(resourceTable.getPackageName(), f, qualifiers);
63 resourceTable.addResource(type, shortName, new FileTypedResource.Image(f, isNinePatch, fakeXmlContext));
StaxArrayLoader.java 13 public StaxArrayLoader(PackageResourceTable resourceTable, String attrType, ResType arrayResType, final ResType scalarResType) {
14 super(resourceTable, attrType, arrayResType);
48 resourceTable.addResource(attrType, name, new TypedResource<>(items, resType, xmlContext));
StaxPluralsLoader.java 13 public StaxPluralsLoader(PackageResourceTable resourceTable, String attrType, ResType charSequence) {
14 super(resourceTable, attrType, charSequence);
49 resourceTable.addResource(attrType, name, new PluralRules(new ArrayList<>(plurals), resType, xmlContext));
StaxValueLoader.java 10 public StaxValueLoader(PackageResourceTable resourceTable, String attrType, ResType resType) {
11 super(resourceTable, attrType, resType);
37 resourceTable.addResource(attrType, name, new TypedResource<>(s, resType, xmlContext));
StaxAttrLoader.java 13 public StaxAttrLoader(PackageResourceTable resourceTable, String attrType, ResType resType) {
14 super(resourceTable, attrType, resType);
58 resourceTable.addResource(attrType, name, new TypedResource<>(attrData, resType, xmlContext));
StaxStyleLoader.java 13 public StaxStyleLoader(PackageResourceTable resourceTable, String attrType, ResType resType) {
14 super(resourceTable, attrType, resType);
59 resourceTable.addResource("style", styleData.getName(), new TypedResource<>(styleData, resType, xmlContext));
PackageResourceTable.java 12 * A {@link ResourceTable} for a single package, e.g: "android" / ox01
14 public class PackageResourceTable implements ResourceTable {
17 private final BiMap<Integer, ResName> resourceTable = HashBiMap.create();
39 Integer id = resourceTable.inverse().get(resName);
44 resourceTable
53 return resourceTable.get(resourceId);
120 ResName existingEntry = resourceTable.put(resId, resName);
132 Integer oldId = resourceTable.inverse().get(resNameWithUnderscores);
134 resourceTable.forcePut(oldId, resName);
137 Integer id = resourceTable.inverse().get(resName)
    [all...]
  /external/robolectric-shadows/robolectric/src/test/java/org/robolectric/res/
ResourceTableTest.java 13 private PackageResourceTable resourceTable;
17 resourceTable = new ResourceTableFactory().newResourceTable("myPackage");
22 resourceTable.addResource(0x02999999, "type", "name");
24 assertThat(resourceTable.getPackageName()).isEqualTo("myPackage");
29 resourceTable.addResource(0x02999999, "type", "name");
31 assertThat(resourceTable.getPackageIdentifier()).isEqualTo(0x02);
36 resourceTable.addResource(0x02999999, "type", "name");
37 resourceTable.addResource(0x03999999, "type", "name");
42 resourceTable.addResource(0x02888888, "type", "name");
43 resourceTable.addResource(0x02999999, "type", "name")
    [all...]
RawResourceLoaderTest.java 17 private PackageResourceTable resourceTable;
21 resourceTable = new ResourceTableFactory().newResourceTable("packageName", testResources());
23 rawResourceLoader.loadTo(resourceTable);
28 String f = (String) resourceTable.getValue(R.raw.raw_resource, new ResTable_config()).getData();
34 String f = (String) resourceTable.getValue(R.raw.raw_no_ext, new ResTable_config()).getData();
ResourceParserTest.java 15 private ResourceTable resourceTable;
21 resourceTable = resourceTableFactory.newResourceTable("org.robolectric", testResources());
27 TypedResource value = resourceTable.getValue(new ResName("org.robolectric", "drawable", "rainbow"), config);
36 TypedResource value = resourceTable.getValue(new ResName("org.robolectric", "drawable", "an_image"), config);
45 TypedResource value = resourceTable.getValue(new ResName("org.robolectric", "drawable", "example_item_drawable"), config);
54 TypedResource value = resourceTable.getValue(new ResName("org.robolectric", "id", "id_declared_in_item_tag"), config);
65 resourceTable.getValue(
StyleResourceLoaderTest.java 17 private PackageResourceTable resourceTable;
23 resourceTable = new ResourceTableFactory().newResourceTable("android", resourcePath);
28 TypedResource typedResource = resourceTable.getValue(new ResName("android", "style", "Theme_Holo"), new ResTable_config());
DrawableResourceLoaderNoRunnerTest.java 38 private PackageResourceTable resourceTable;
42 resourceTable = new ResourceTableFactory().newResourceTable("org.robolectric");
71 DrawableResourceLoader testLoader = new DrawableResourceLoader(resourceTable);
74 assertThat(resourceTable.getValue(new ResName("org.robolectric", "drawable", "foo"), new ResTable_config()).isFile()).isTrue();
94 DrawableResourceLoader testLoader = new DrawableResourceLoader(resourceTable);
97 assertThat(resourceTable.getValue(new ResName("org.robolectric", "drawable", "foo"), new ResTable_config()).isFile()).isTrue();
117 DrawableResourceLoader testLoader = new DrawableResourceLoader(resourceTable);
120 assertThat(resourceTable.getValue(new ResName("org.robolectric", "drawable", "foo"), new ResTable_config()).isFile()).isTrue();
140 DrawableResourceLoader testLoader = new DrawableResourceLoader(resourceTable);
143 assertThat(resourceTable.getValue(new ResName("org.robolectric", "drawable", "foo"), new ResTable_config()).isFile()).isTru (…)
    [all...]
ResourceTestUtil.java 20 static String stringify(ResourceTable resourceTable) {
22 resourceTable.receive(new ResourceTable.Visitor() {
  /external/robolectric-shadows/robolectric/src/main/java/org/robolectric/
ApkLoader.java 36 PackageResourceTable resourceTable = appResourceTableCache.get(appManifest);
37 if (resourceTable == null) {
38 resourceTable = new ResourceMerger().buildResourceTable(appManifest);
40 appResourceTableCache.put(appManifest, resourceTable);
42 return resourceTable;
46 * Returns the ResourceTable for the compile time SDK.
  /external/robolectric-shadows/resources/src/test/java/org/robolectric/res/
StaxValueLoaderTest.java 18 private PackageResourceTable resourceTable;
24 resourceTable = new PackageResourceTable("pkg");
33 .addHandler("string", new StaxValueLoader(resourceTable, "string", ResType.CHAR_SEQUENCE))
40 assertThat(resourceTable.getValue(new ResName("pkg:string/preposition_for_date"), new ResTable_config()).getData())
47 .addHandler("item[@type='string']", new StaxValueLoader(resourceTable, "string", ResType.CHAR_SEQUENCE))
54 assertThat(resourceTable.getValue(new ResName("pkg:string/sms_short_code_details"), new ResTable_config()).getData())
  /external/robolectric-shadows/resources/src/main/java/org/robolectric/manifest/
MetaData.java 7 import org.robolectric.res.ResourceTable;
35 public void init(ResourceTable resourceTable, String packageName) throws RoboNotFoundException {
45 valueMap.put(entry.getKey(), resourceTable.getResourceId(resName));
49 TypedResource<?> typedRes = resourceTable.getValue(resName, new ResTable_config());
  /external/robolectric-shadows/shadows/framework/src/main/java/org/robolectric/shadows/
ShadowArscResourcesImpl.java 40 import org.robolectric.res.ResourceTable;
112 ResourceTable resourceTable = shadowAssetManager.getResourceTable();
113 InputStream inputStream = resourceTable.getRawValue(id, shadowAssetManager.config);
147 ResourceTable resourceTable = legacyShadowOf(realResourcesImpl.getAssets()).getResourceTable();
148 ResName resName = resourceTable.getResName(id);
ShadowLegacyResourcesImpl.java 35 import org.robolectric.res.ResourceTable;
86 ResourceTable resourceTable = shadowAssetManager.getResourceTable();
87 InputStream inputStream = resourceTable.getRawValue(id, shadowAssetManager.config);
117 ResourceTable resourceTable = legacyShadowOf(realResourcesImpl.getAssets()).getResourceTable();
118 ResName resName = resourceTable.getResName(id);
ShadowLegacyAssetManager.java 72 import org.robolectric.res.ResourceTable;
122 private ResourceTable resourceTable;
165 resourceId = resourceTable.getResourceId(resName);
180 TypedResource dereferencedRef = resourceTable.getValue(resName, config);
241 return resourceTable.getValue(resName, config);
246 resourceTable = RuntimeEnvironment.getAppResourceTable();
257 resourceTable = isSystem ? RuntimeEnvironment.getSystemResourceTable() : RuntimeEnvironment.getAppResourceTable();
282 protected ResourceTable getResourceTable() {
283 return resourceTable;
    [all...]
ShadowResources.java 45 import org.robolectric.res.ResourceTable;
136 ResourceTable resourceTable = shadowAssetManager.getResourceTable();
137 InputStream inputStream = resourceTable.getRawValue(id, shadowAssetManager.config);
175 ResourceTable resourceTable = legacyShadowOf(realResources.getAssets()).getResourceTable();
176 ResName resName = resourceTable.getResName(id);
  /external/robolectric-shadows/shadows/framework/src/main/java/org/robolectric/android/
XmlResourceParserImpl.java 16 import org.robolectric.res.ResourceTable;
56 private final ResourceTable resourceTable;
67 String applicationPackageName, ResourceTable resourceTable) {
71 this.resourceTable = resourceTable;
782 Integer resourceId = resourceTable.getResourceId(styleReference);
791 Integer resourceId = resourceTable.getResourceId(resourceReference);
799 Integer resourceId = resourceTable.getResourceId(resName)
    [all...]

Completed in 621 milliseconds

1 2