@Implements(value=android.content.res.ResourcesImpl.class, isInAndroidSdk=false, minSdk=24, shadowPicker=ShadowResourcesImpl.Picker.class) public class ShadowArscResourcesImpl extends ShadowResourcesImpl
ShadowResourcesImpl.Picker, ShadowResourcesImpl.ShadowThemeImpl| Constructor and Description |
|---|
ShadowArscResourcesImpl() |
| 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) |
java.io.InputStream |
openRawResource(int id) |
android.content.res.AssetFileDescriptor |
openRawResourceFd(int id)
Since
AssetFileDescriptors 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 AssetFileDescriptors 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@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)