Package org.robolectric.shadows
Class ShadowLegacyResourcesImpl
java.lang.Object
org.robolectric.shadows.ShadowResourcesImpl
org.robolectric.shadows.ShadowLegacyResourcesImpl
@Implements(value=android.content.res.ResourcesImpl.class,
isInAndroidSdk=false,
minSdk=24,
shadowPicker=Picker.class)
public class ShadowLegacyResourcesImpl
extends ShadowResourcesImpl
-
Nested Class Summary
Nested classes/interfaces inherited from class org.robolectric.shadows.ShadowResourcesImpl
ShadowResourcesImpl.Picker, ShadowResourcesImpl.ShadowThemeImpl
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetQuantityString
(int resId, int quantity) getQuantityString
(int id, int quantity, Object... formatArgs) loadDrawable
(Resources wrapper, TypedValue value, int id, int density, Resources.Theme theme) loadDrawable
(Resources wrapper, TypedValue value, int id, Resources.Theme theme, boolean useCache) loadXmlResourceParser
(int resId, String type) loadXmlResourceParser
(String file, int id, int assetCookie, String type) openRawResource
(int id) openRawResourceFd
(int id) SinceAssetFileDescriptor
s are not yet supported by Robolectric,null
will be returned if the resource is found.static void
reset()
-
Constructor Details
-
ShadowLegacyResourcesImpl
public ShadowLegacyResourcesImpl()
-
-
Method Details
-
reset
-
getQuantityString
@Implementation(maxSdk=23) public String getQuantityString(int id, int quantity, Object... formatArgs) throws Resources.NotFoundException - Throws:
Resources.NotFoundException
-
getQuantityString
@Implementation(maxSdk=23) public String getQuantityString(int resId, int quantity) throws Resources.NotFoundException - Throws:
Resources.NotFoundException
-
openRawResource
@Implementation(maxSdk=23) public InputStream openRawResource(int id) throws Resources.NotFoundException - Throws:
Resources.NotFoundException
-
openRawResourceFd
@Implementation(maxSdk=23) public AssetFileDescriptor openRawResourceFd(int id) throws Resources.NotFoundException SinceAssetFileDescriptor
s are not yet supported by Robolectric,null
will be returned if the resource is found. If the resource cannot be found,Resources.NotFoundException
will be thrown.- Throws:
Resources.NotFoundException
-
loadXmlResourceParser
@HiddenApi @Implementation(maxSdk=23) public XmlResourceParser loadXmlResourceParser(int resId, String type) throws Resources.NotFoundException - Throws:
Resources.NotFoundException
-
loadXmlResourceParser
@HiddenApi @Implementation public XmlResourceParser loadXmlResourceParser(String file, int id, int assetCookie, String type) throws Resources.NotFoundException - Throws:
Resources.NotFoundException
-
loadDrawable
@Implementation(maxSdk=25) public Drawable loadDrawable(Resources wrapper, TypedValue value, int id, Resources.Theme theme, boolean useCache) throws Resources.NotFoundException - Throws:
Resources.NotFoundException
-
loadDrawable
@Implementation(minSdk=26) public Drawable loadDrawable(Resources wrapper, TypedValue value, int id, int density, Resources.Theme theme)
-