Home
last modified time | relevance | path

Searched refs:TypedResource (Results 1 – 25 of 26) sorted by relevance

12

/external/robolectric-shadows/robolectric/src/test/java/org/robolectric/res/
DResBundleTest.java30 TypedResource<String> val1 = createStringTypedResource("v16"); in closestMatchIsPicked()
32 TypedResource<String> val2 = createStringTypedResource("v17"); in closestMatchIsPicked()
35 TypedResource v = resMap.pick(resName, from("v18")); in closestMatchIsPicked()
41 TypedResource<String> val1 = createStringTypedResource("en"); in firstValIsPickedWhenNoMatch()
43 TypedResource<String> val2 = createStringTypedResource("fr"); in firstValIsPickedWhenNoMatch()
46 TypedResource v = resMap.pick(resName, from("en-v18")); in firstValIsPickedWhenNoMatch()
52 TypedResource<String> val1 = createStringTypedResource("v16"); in bestValIsPickedForSdkVersion()
54 TypedResource<String> val2 = createStringTypedResource("v17"); in bestValIsPickedForSdkVersion()
57 TypedResource v = resMap.pick(resName, from("v26")); in bestValIsPickedForSdkVersion()
63 TypedResource<String> val1 = createStringTypedResource("land-v16"); in eliminatedValuesAreNotPickedForVersion()
[all …]
DResourceTestUtil.java21 final HashMap<String, List<TypedResource>> map = new HashMap<>(); in stringify()
24 public void visit(ResName key, Iterable<TypedResource> values) { in stringify()
25 List<TypedResource> v = new ArrayList<>(); in stringify()
26 for (TypedResource value : values) { in stringify()
36 for (TypedResource typedResource : map.get(key)) { in stringify()
41 if (item.getClass().equals(TypedResource.class)) { in stringify()
42 TypedResource typedResourceItem = (TypedResource) item; in stringify()
68 static String shortContext(TypedResource typedResource) { in shortContext()
DResourceParserTest.java27TypedResource value = resourceTable.getValue(new ResName("org.robolectric", "drawable", "rainbow")… in shouldLoadDrawableXmlResources()
36TypedResource value = resourceTable.getValue(new ResName("org.robolectric", "drawable", "an_image"… in shouldLoadDrawableBitmapResources()
45TypedResource value = resourceTable.getValue(new ResName("org.robolectric", "drawable", "example_i… in shouldLoadDrawableBitmapResourcesDefinedByItemTag()
54TypedResource value = resourceTable.getValue(new ResName("org.robolectric", "id", "id_declared_in_… in shouldLoadIdResourcesDefinedByItemTag()
64 TypedResource value = in whenIdItemsHaveStringContent_shouldLoadIdResourcesDefinedByItemTag()
DStyleResourceLoaderTest.java28TypedResource typedResource = resourceTable.getValue(new ResName("android", "style", "Theme_Holo")… in testStyleDataIsLoadedCorrectly()
/external/robolectric-shadows/robolectric/src/test/java/org/robolectric/shadows/
DConverterTest.java14 import org.robolectric.res.TypedResource;
32 …final TypedResource<String> resource = new TypedResource<>(" 100 ", ResType.CHAR_SEQUENCE, xmlCont… in fromCharSequence_asInt_shouldHandleSpacesInString()
38 …final TypedResource<String> resource = new TypedResource<>(" Robolectric ", ResType.CHAR_SEQUENCE,… in fromCharSequence_asCharSequence_shouldHandleSpacesInString()
44 …final TypedResource<String> resource = new TypedResource<>(" #aaaaaa ", ResType.COLOR, xmlContext); in fromColor_asInt_shouldHandleSpacesInString()
50 …final TypedResource<String> resource = new TypedResource<>(" #aaaaaa ", ResType.DRAWABLE, xmlConte… in fromDrawableValue_asInt_shouldHandleSpacesInString()
56 … final TypedResource<String> resource = new TypedResource<>(" 100 ", ResType.INTEGER, xmlContext); in fromInt_asInt_shouldHandleSpacesInString()
/external/robolectric-shadows/resources/src/main/java/org/robolectric/res/
DResBundle.java13 public void put(ResName resName, TypedResource value) { in put()
17 public TypedResource get(ResName resName, ResTable_config config) { in get()
22 for (final Map.Entry<ResName, List<TypedResource>> entry : valuesMap.map.entrySet()) { in receive()
28 private final Map<ResName, List<TypedResource>> map = new HashMap<>();
30 public TypedResource pick(ResName resName, ResTable_config toMatch) { in pick()
31 List<TypedResource> values = map.get(resName); in pick()
34 TypedResource bestMatchSoFar = null; in pick()
35 for (TypedResource candidate : values) { in pick()
54 public void put(ResName resName, TypedResource value) { in put()
DResourceTable.java14 TypedResource getValue(int resId, ResTable_config config); in getValue()
16 TypedResource getValue(@Nonnull ResName resName, ResTable_config config); in getValue()
29 void visit(ResName key, Iterable<TypedResource> values); in visit()
DStaxArrayLoader.java10 private List<TypedResource> items;
30 items.add(new TypedResource<>(buf.toString(), resType, xmlContext)); in StaxArrayLoader()
48 resourceTable.addResource(attrType, name, new TypedResource<>(items, resType, xmlContext)); in onEnd()
DPackageResourceTable.java57 public TypedResource getValue(@Nonnull ResName resName, ResTable_config config) { in getValue()
62 public TypedResource getValue(int resId, ResTable_config config) { in getValue()
90 TypedResource typedResource = resources.get(resName, config); in getFileResource()
126 void addResource(String type, String name, TypedResource value) { in addResource()
DTypedResource.java5 public class TypedResource<T> { class
10 public TypedResource(T data, ResType resType, XmlContext xmlContext) { in TypedResource() method in TypedResource
DResBunch.java11 public void put(ResName resName, TypedResource value) { in put()
25 public TypedResource get(@Nonnull ResName resName, ResTable_config config) { in get()
DRoutingResourceTable.java28 @Override public TypedResource getValue(@Nonnull ResName resName, ResTable_config config) { in getValue()
32 @Override public TypedResource getValue(int resId, ResTable_config config) { in getValue()
DPluralRules.java5 public class PluralRules extends TypedResource<List<Plural>> {
DFileTypedResource.java3 public class FileTypedResource extends TypedResource<String> {
DStaxValueLoader.java37 resourceTable.addResource(attrType, name, new TypedResource<>(s, resType, xmlContext)); in onEnd()
DStaxAttrLoader.java58 resourceTable.addResource(attrType, name, new TypedResource<>(attrData, resType, xmlContext)); in onEnd()
DStaxStyleLoader.java59 …resourceTable.addResource("style", styleData.getName(), new TypedResource<>(styleData, resType, xm… in onEnd()
DStyleResolver.java92 TypedResource typedResource = resourceProvider.getValue(styleRef, config); in getParent()
/external/robolectric-shadows/shadows/framework/src/main/java/org/robolectric/shadows/
DConverter.java10 import org.robolectric.res.TypedResource;
82 public CharSequence asCharSequence(TypedResource typedResource) { in asCharSequence()
86 public int asInt(TypedResource typedResource) { in asInt()
90 public List<TypedResource> getItems(TypedResource typedResource) { in getItems()
104 public CharSequence asCharSequence(TypedResource typedResource) { in asCharSequence()
117 public CharSequence asCharSequence(TypedResource typedResource) { in asCharSequence()
122 public int asInt(TypedResource typedResource) { in asInt()
151 public int asInt(TypedResource typedResource) { in asInt()
169 public List<TypedResource> getItems(TypedResource typedResource) { in getItems()
170 return (List<TypedResource>) typedResource.getData(); in getItems()
[all …]
DShadowLegacyAssetManager.java77 import org.robolectric.res.TypedResource;
180 TypedResource dereferencedRef = resourceTable.getValue(resName, config); in convertAndFill()
210 TypedResource attrTypeData = getAttrTypeData(attribute.resName); in convertAndFill()
240 public TypedResource getAttrTypeData(ResName resName) { in getAttrTypeData()
288 TypedResource value = getAndResolve(ident, config, true); in getResourceText()
322 TypedResource value = getAndResolve(ident, config, resolveRefs); in getResourceValue()
329 private Converter getConverter(TypedResource value) { in getConverter()
340 TypedResource value = getAndResolve(resId, config, true); in getResourceTextArray()
342 List<TypedResource> items = getConverter(value).getItems(value); in getResourceTextArray()
345 TypedResource typedResource = resolve(items.get(i), config, resId); in getResourceTextArray()
[all …]
DShadowArscResourcesImpl.java41 import org.robolectric.res.TypedResource;
91TypedResource typedResource = shadowAssetManager.getResourceTable().getValue(resId, shadowAssetMan… in getQuantityString()
100 TypedResource<?> resolvedTypedResource = shadowAssetManager.resolve( in getQuantityString()
101 …new TypedResource<>(plural.getString(), ResType.CHAR_SEQUENCE, pluralRules.getXmlContext()), shado… in getQuantityString()
DShadowLegacyResourcesImpl.java36 import org.robolectric.res.TypedResource;
66TypedResource typedResource = shadowAssetManager.getResourceTable().getValue(resId, shadowAssetMan… in getQuantityString()
75 TypedResource<?> resolvedTypedResource = shadowAssetManager.resolve( in getQuantityString()
76 …new TypedResource<>(plural.getString(), ResType.CHAR_SEQUENCE, pluralRules.getXmlContext()), shado… in getQuantityString()
DShadowResources.java46 import org.robolectric.res.TypedResource;
110 TypedResource typedResource = shadowAssetManager.getResourceTable() in getQuantityString()
120 TypedResource<?> resolvedTypedResource = shadowAssetManager.resolve( in getQuantityString()
121 … new TypedResource<>(plural.getString(), ResType.CHAR_SEQUENCE, pluralRules.getXmlContext()), in getQuantityString()
/external/robolectric-shadows/robolectric/src/main/java/org/robolectric/res/
DNullResourceTable.java23 public TypedResource getValue(int resId, ResTable_config config) { in getValue()
25 return new TypedResource<>(null, ResType.NULL, in getValue()
30 public TypedResource getValue(@Nonnull ResName resName, ResTable_config config) { in getValue()
32 return new TypedResource<>(null, ResType.NULL, in getValue()
/external/robolectric-shadows/resources/src/main/java/org/robolectric/manifest/
DMetaData.java8 import org.robolectric.res.TypedResource;
49 TypedResource<?> typedRes = resourceTable.getValue(resName, new ResTable_config()); in init()

12