@Implements(value=android.content.res.ResourcesImpl.class, isInAndroidSdk=false, minSdk=24, shadowPicker=ShadowResourcesImpl.Picker.class) public class ShadowLegacyResourcesImpl extends ShadowResourcesImpl
Modifier and Type | Class and Description |
---|---|
static class |
ShadowLegacyResourcesImpl.ShadowLegacyThemeImpl |
ShadowResourcesImpl.Picker, ShadowResourcesImpl.ShadowThemeImpl
Constructor and Description |
---|
ShadowLegacyResourcesImpl() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getQuantityString(int resId,
int quantity) |
java.lang.String |
getQuantityString(int id,
int quantity,
java.lang.Object... formatArgs) |
android.graphics.drawable.Drawable |
loadDrawable(android.content.res.Resources wrapper,
android.util.TypedValue value,
int id,
int density,
android.content.res.Resources.Theme theme) |
android.graphics.drawable.Drawable |
loadDrawable(android.content.res.Resources wrapper,
android.util.TypedValue value,
int id,
android.content.res.Resources.Theme theme,
boolean useCache) |
android.content.res.XmlResourceParser |
loadXmlResourceParser(int resId,
java.lang.String type) |
android.content.res.XmlResourceParser |
loadXmlResourceParser(java.lang.String file,
int id,
int assetCookie,
java.lang.String type) |
java.io.InputStream |
openRawResource(int id) |
android.content.res.AssetFileDescriptor |
openRawResourceFd(int id)
Since
AssetFileDescriptor s are not yet supported by Robolectric, null will be returned if the resource is found. |
static void |
reset() |
@Resetter public static void reset()
@Implementation(maxSdk=23) public java.lang.String getQuantityString(int id, int quantity, java.lang.Object... formatArgs) throws android.content.res.Resources.NotFoundException
android.content.res.Resources.NotFoundException
@Implementation(maxSdk=23) public java.lang.String getQuantityString(int resId, int quantity) throws android.content.res.Resources.NotFoundException
android.content.res.Resources.NotFoundException
@Implementation(maxSdk=23) public java.io.InputStream openRawResource(int id) throws android.content.res.Resources.NotFoundException
android.content.res.Resources.NotFoundException
@Implementation(maxSdk=23) public android.content.res.AssetFileDescriptor openRawResourceFd(int id) throws android.content.res.Resources.NotFoundException
Since AssetFileDescriptor
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.
android.content.res.Resources.NotFoundException
@HiddenApi @Implementation(maxSdk=23) public android.content.res.XmlResourceParser loadXmlResourceParser(int resId, java.lang.String type) throws android.content.res.Resources.NotFoundException
android.content.res.Resources.NotFoundException
@HiddenApi @Implementation public android.content.res.XmlResourceParser loadXmlResourceParser(java.lang.String file, int id, int assetCookie, java.lang.String type) throws android.content.res.Resources.NotFoundException
android.content.res.Resources.NotFoundException
@Implementation(maxSdk=25) public android.graphics.drawable.Drawable loadDrawable(android.content.res.Resources wrapper, android.util.TypedValue value, int id, android.content.res.Resources.Theme theme, boolean useCache) throws android.content.res.Resources.NotFoundException
android.content.res.Resources.NotFoundException
@Implementation(minSdk=26) public android.graphics.drawable.Drawable loadDrawable(android.content.res.Resources wrapper, android.util.TypedValue value, int id, int density, android.content.res.Resources.Theme theme)