Home
last modified time | relevance | path

Searched refs:resourceExtractor (Results 1 – 25 of 31) sorted by relevance

12

/external/robolectric/v1/src/test/java/com/xtremelabs/robolectric/res/
DResourceExtractorTest.java12 private ResourceExtractor resourceExtractor; field in ResourceExtractorTest
16 resourceExtractor = new ResourceExtractor(); in setUp()
17 resourceExtractor.addLocalRClass(R.class); in setUp()
18 resourceExtractor.addSystemRClass(android.R.class); in setUp()
23 assertThat(resourceExtractor.getLocalResourceId("id/textStyle"), equalTo(R.id.textStyle)); in shouldHandleStyleable()
24 …assertThat(resourceExtractor.getLocalResourceId("styleable/TitleBar_textStyle"), CoreMatchers.<Obj… in shouldHandleStyleable()
29 … assertThat(resourceExtractor.getResourceId("android:id/text1"), equalTo(android.R.id.text1)); in shouldPrefixAllSystemResourcesWithAndroid()
34 assertThat(resourceExtractor.getLocalResourceId("@null"), equalTo(0)); in shouldHandleNull()
DTestAttributeSetTest.java22 private ResourceExtractor resourceExtractor; field in TestAttributeSetTest
28 resourceExtractor = new ResourceExtractor(); in setUp()
29 resourceExtractor.addLocalRClass(R.class); in setUp()
30 resourceExtractor.addSystemRClass(android.R.class); in setUp()
36 …TestAttributeSet testAttributeSet = new TestAttributeSet(attributes, resourceExtractor, null, null… in getSystemAttributeResourceValue_shouldReturnTheResourceValue()
43 …TestAttributeSet testAttributeSet = new TestAttributeSet(attributes, resourceExtractor, null, null… in getSystemAttributeResourceValue_shouldNotReturnTheResourceValueIfNameSpaceDoesNotMatch()
50 …TestAttributeSet testAttributeSet = new TestAttributeSet(attributes, resourceExtractor, null, null… in getSystemAttributeResourceValue_shouldReturnDefaultValueForNullResourceId()
58 …TestAttributeSet testAttributeSet = new TestAttributeSet(attributes, resourceExtractor, null, null… in shouldCopeWithDefiningSystemIds()
66 …TestAttributeSet testAttributeSet = new TestAttributeSet(attributes, resourceExtractor, null, null… in shouldCopeWithDefiningLocalIds()
74 …TestAttributeSet testAttributeSet = new TestAttributeSet(attributes, resourceExtractor, null, null… in getAttributeResourceValue_shouldReturnTheResourceValue()
[all …]
DPreferenceLoaderTest.java35 ResourceExtractor resourceExtractor = new ResourceExtractor(); in setUp() local
36 resourceExtractor.addLocalRClass(R.class); in setUp()
37 StringResourceLoader stringResourceLoader = new StringResourceLoader(resourceExtractor); in setUp()
39 prefLoader = new PreferenceLoader(resourceExtractor); in setUp()
57 ResourceExtractor resourceExtractor = new ResourceExtractor(); in shouldThrowI18nExceptionOnPrefsWithBareStrings() local
58 resourceExtractor.addLocalRClass(R.class); in shouldThrowI18nExceptionOnPrefsWithBareStrings()
59 StringResourceLoader stringResourceLoader = new StringResourceLoader(resourceExtractor); in shouldThrowI18nExceptionOnPrefsWithBareStrings()
61 prefLoader = new PreferenceLoader(resourceExtractor); in shouldThrowI18nExceptionOnPrefsWithBareStrings()
DStringArrayResourceLoaderTest.java19 ResourceExtractor resourceExtractor = new ResourceExtractor(); in setUp() local
20 resourceExtractor.addLocalRClass(R.class); in setUp()
21 resourceExtractor.addSystemRClass(android.R.class); in setUp()
26 StringResourceLoader stringResourceLoader = new StringResourceLoader(resourceExtractor); in setUp()
30 …stringArrayResourceLoader = new StringArrayResourceLoader(resourceExtractor, stringResourceLoader); in setUp()
DPluralResourceLoaderTest.java16 ResourceExtractor resourceExtractor = new ResourceExtractor(); in setUp() local
17 resourceExtractor.addLocalRClass(R.class); in setUp()
19 StringResourceLoader stringResourceLoader = new StringResourceLoader(resourceExtractor); in setUp()
20 pluralResourceLoader = new PluralResourceLoader(resourceExtractor, stringResourceLoader); in setUp()
DMenuLoaderTest.java37 ResourceExtractor resourceExtractor = new ResourceExtractor(); in setUp() local
38 resourceExtractor.addLocalRClass(R.class); in setUp()
39 resourceExtractor.addSystemRClass(android.R.class); in setUp()
41 StringResourceLoader stringResourceLoader = new StringResourceLoader(resourceExtractor); in setUp()
45 menuLoader = new MenuLoader(resourceExtractor, new AttrResourceLoader(resourceExtractor)); in setUp()
DAttrResourceLoaderTest.java21 ResourceExtractor resourceExtractor = new ResourceExtractor(); in setUp() local
22 resourceExtractor.addLocalRClass(R.class); in setUp()
23 resourceExtractor.addSystemRClass(android.R.class); in setUp()
24 attrResourceLoader = new AttrResourceLoader(resourceExtractor); in setUp()
DColorResourceLoaderTest.java17 ResourceExtractor resourceExtractor = new ResourceExtractor(); in setUp() local
18 resourceExtractor.addLocalRClass(R.class); in setUp()
19 resourceExtractor.addSystemRClass(android.R.class); in setUp()
20 colorResourceLoader = new ColorResourceLoader(resourceExtractor); in setUp()
DDimenResourceLoaderTest.java18 ResourceExtractor resourceExtractor = new ResourceExtractor(); in setUp() local
19 resourceExtractor.addLocalRClass(R.class); in setUp()
20 dimenResourceLoader = new DimenResourceLoader(resourceExtractor); in setUp()
DStringResourceLoaderTest.java15 ResourceExtractor resourceExtractor = new ResourceExtractor(); in setUp() local
16 resourceExtractor.addLocalRClass(R.class); in setUp()
17 stringResourceLoader = new StringResourceLoader(resourceExtractor); in setUp()
DRawResourceLoaderTest.java26 ResourceExtractor resourceExtractor = new ResourceExtractor(); in setUp() local
27 resourceExtractor.addLocalRClass(R.class); in setUp()
28 rawResourceLoader = new RawResourceLoader(resourceExtractor, resourceFile("res")); in setUp()
/external/robolectric/v1/src/main/java/com/xtremelabs/robolectric/res/
DResourceLoader.java58 private final ResourceExtractor resourceExtractor; field in ResourceLoader
87 resourceExtractor = new ResourceExtractor(); in ResourceLoader()
89 resourceExtractor.addLocalRClass( rClass ); in ResourceLoader()
91 resourceExtractor.addSystemRClass( R.class ); in ResourceLoader()
93 stringResourceLoader = new StringResourceLoader( resourceExtractor ); in ResourceLoader()
94 pluralResourceLoader = new PluralResourceLoader( resourceExtractor, stringResourceLoader ); in ResourceLoader()
95 …stringArrayResourceLoader = new StringArrayResourceLoader( resourceExtractor, stringResourceLoader… in ResourceLoader()
96 colorResourceLoader = new ColorResourceLoader( resourceExtractor ); in ResourceLoader()
97 attrResourceLoader = new AttrResourceLoader( resourceExtractor ); in ResourceLoader()
98 drawableResourceLoader = new DrawableResourceLoader( resourceExtractor, resourceDir ); in ResourceLoader()
[all …]
DRawResourceLoader.java10 private ResourceExtractor resourceExtractor; field in RawResourceLoader
13 public RawResourceLoader(ResourceExtractor resourceExtractor, File resourceDir) { in RawResourceLoader() argument
14 this.resourceExtractor = resourceExtractor; in RawResourceLoader()
19 String resourceFileName = resourceExtractor.getResourceName(resourceId); in getValue()
DXmlLoader.java8 protected ResourceExtractor resourceExtractor; field in XmlLoader
11 public XmlLoader(ResourceExtractor resourceExtractor) { in XmlLoader() argument
12 this.resourceExtractor = resourceExtractor; in XmlLoader()
DStringResourceLoader.java8 public StringResourceLoader(ResourceExtractor resourceExtractor) { in StringResourceLoader() argument
9 super(resourceExtractor, "/resources/string"); in StringResourceLoader()
13 return stringResolver.getValue(resourceExtractor.getResourceName(resourceId)); in getValue()
17 return getValue(resourceExtractor.getResourceId(resourceName, isSystem)); in getValue()
DDimenResourceLoader.java11 public DimenResourceLoader(ResourceExtractor resourceExtractor) { in DimenResourceLoader() argument
12 super(resourceExtractor, "/resources/dimen"); in DimenResourceLoader()
16 return dimenResolver.getValue(resourceExtractor.getResourceName(resourceId)); in getValue()
20 return getValue(resourceExtractor.getResourceId(resourceName, isSystem)); in getValue()
DIntegerResourceLoader.java9 public IntegerResourceLoader( ResourceExtractor resourceExtractor ) { in IntegerResourceLoader() argument
10 super( resourceExtractor, "integer" ); in IntegerResourceLoader()
15 String resourceName = resourceExtractor.getResourceName(resourceId); in getValue()
28 Integer resourceId = resourceExtractor.getResourceId(resourceName, isSystem); in getValue()
DDrawableResourceLoader.java62 return documents.containsKey(resourceExtractor.getResourceName(resourceId)); in isXml()
71 Document xmlDoc = documents.get(resourceExtractor.getResourceName(resId)); in getXmlDrawable()
134 String resourceName = resourceExtractor.getResourceName(resourceId); in getDrawableIds()
147 drawableIds[i] = resourceExtractor.getResourceId(drawableName.getNodeValue()); in getDrawableIds()
156 Document document = documents.get(resourceExtractor.getResourceName(resourceId)); in isAnimationDrawable()
168 int resId = resourceExtractor.getResourceId(drawableName.getNodeValue()); in buildStateListDrawable()
DColorResourceLoader.java27 public ColorResourceLoader(ResourceExtractor resourceExtractor) { in ColorResourceLoader() argument
28 super(resourceExtractor, "/resources/color"); in ColorResourceLoader()
32 String resourceName = resourceExtractor.getResourceName(colorId); in getValue()
DStringArrayResourceLoader.java19 …public StringArrayResourceLoader(ResourceExtractor resourceExtractor, StringResourceLoader stringR… in StringArrayResourceLoader() argument
20 super(resourceExtractor, "/resources/string-array"); in StringArrayResourceLoader()
25 String resourceName = resourceExtractor.getResourceName(resourceId); in getArrayValue()
DPluralResourceLoader.java19 …public PluralResourceLoader(ResourceExtractor resourceExtractor, StringResourceLoader stringResour… in PluralResourceLoader() argument
20 super(resourceExtractor, "/resources/plurals"); in PluralResourceLoader()
25 String name = resourceExtractor.getResourceName(resourceId); in getValue()
DMenuLoader.java27 public MenuLoader(ResourceExtractor resourceExtractor, AttrResourceLoader attrResourceLoader) { in MenuLoader() argument
28 super(resourceExtractor); in MenuLoader()
102 inflateMenu(context, resourceExtractor.getResourceName(resourceId), in inflateMenu()
138 resourceExtractor, attrResourceLoader, null, false); in MenuNode()
DXpathResourceXmlLoader.java16 public XpathResourceXmlLoader(ResourceExtractor resourceExtractor, String expression) { in XpathResourceXmlLoader() argument
17 super(resourceExtractor); in XpathResourceXmlLoader()
DXTagXmlResourceLoader.java32 public XTagXmlResourceLoader( ResourceExtractor resourceExtractor, String tag ) { in XTagXmlResourceLoader() argument
33 super( resourceExtractor ); in XTagXmlResourceLoader()
/external/robolectric/v1/src/main/java/com/xtremelabs/robolectric/tester/android/util/
DTestAttributeSet.java13 private ResourceExtractor resourceExtractor; field in TestAttributeSet
32 public TestAttributeSet(Map<String, String> attributes, ResourceExtractor resourceExtractor, in TestAttributeSet() argument
35 this.resourceExtractor = resourceExtractor; in TestAttributeSet()
43 this.resourceExtractor = new ResourceExtractor(); in TestAttributeSet()
44 this.attrResourceLoader = new AttrResourceLoader(this.resourceExtractor); in TestAttributeSet()
136 resourceId = resourceExtractor.getResourceId(value); in getAttributeResourceValue()
143 String attrName = resourceExtractor.getResourceName(resourceId); in getAttributeResourceValue()
145 return (value == null) ? defaultValue : resourceExtractor.getResourceId(value); in getAttributeResourceValue()

12