@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 |
|---|---|
String |
getQuantityString(int resId,
int quantity) |
String |
getQuantityString(int id,
int quantity,
Object... formatArgs) |
Drawable |
loadDrawable(Resources wrapper,
TypedValue value,
int id,
int density,
Resources.Theme theme) |
Drawable |
loadDrawable(Resources wrapper,
TypedValue value,
int id,
Resources.Theme theme,
boolean useCache) |
XmlResourceParser |
loadXmlResourceParser(int resId,
String type) |
XmlResourceParser |
loadXmlResourceParser(String file,
int id,
int assetCookie,
String type) |
InputStream |
openRawResource(int id) |
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 String getQuantityString(int id, int quantity, Object... formatArgs) throws Resources.NotFoundException
Resources.NotFoundException@Implementation(maxSdk=23) public String getQuantityString(int resId, int quantity) throws Resources.NotFoundException
Resources.NotFoundException@Implementation(maxSdk=23) public InputStream openRawResource(int id) throws Resources.NotFoundException
Resources.NotFoundException@Implementation(maxSdk=23) public AssetFileDescriptor openRawResourceFd(int id) throws 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.
Resources.NotFoundException@HiddenApi @Implementation(maxSdk=23) public XmlResourceParser loadXmlResourceParser(int resId, String type) throws Resources.NotFoundException
Resources.NotFoundException@HiddenApi @Implementation public XmlResourceParser loadXmlResourceParser(String file, int id, int assetCookie, String type) throws Resources.NotFoundException
Resources.NotFoundException@Implementation(maxSdk=25) public Drawable loadDrawable(Resources wrapper, TypedValue value, int id, Resources.Theme theme, boolean useCache) throws Resources.NotFoundException
Resources.NotFoundException@Implementation(minSdk=26) public Drawable loadDrawable(Resources wrapper, TypedValue value, int id, int density, Resources.Theme theme)