@Implements(value=android.content.res.Resources.class) public class ShadowResources extends Object
Resources.| Modifier and Type | Class and Description |
|---|---|
static class |
ShadowResources.ShadowNotFoundException |
static class |
ShadowResources.ShadowTheme |
| Constructor and Description |
|---|
ShadowResources() |
| Modifier and Type | Method and Description |
|---|---|
android.content.res.TypedArray |
createTypedArray(List<org.robolectric.res.Attribute> set,
int[] attrs) |
android.util.DisplayMetrics |
getDisplayMetrics() |
String |
getQuantityString(int id,
int quantity) |
String |
getQuantityString(int id,
int quantity,
Object... formatArgs) |
org.robolectric.res.ResourceLoader |
getResourceLoader()
Deprecated.
|
static android.content.res.Resources |
getSystem() |
android.graphics.drawable.Drawable |
loadDrawable(android.util.TypedValue value,
int id) |
android.graphics.drawable.Drawable |
loadDrawable(android.util.TypedValue value,
int id,
android.content.res.Resources.Theme theme) |
android.content.res.XmlResourceParser |
loadXmlResourceParser(int id,
String type) |
android.content.res.XmlResourceParser |
loadXmlResourceParser(String file,
int id,
int assetCookie,
String type) |
android.content.res.Resources.Theme |
newTheme() |
android.content.res.TypedArray |
obtainAttributes(android.util.AttributeSet set,
int[] attrs) |
InputStream |
openRawResource(int id) |
android.content.res.AssetFileDescriptor |
openRawResourceFd(int id) |
static void |
reset() |
void |
setDensity(float density) |
void |
setDisplay(android.view.Display display) |
void |
setScaledDensity(float scaledDensity) |
@Resetter public static void reset()
@Implementation public static android.content.res.Resources getSystem()
public android.content.res.TypedArray createTypedArray(List<org.robolectric.res.Attribute> set, int[] attrs)
@Implementation
public android.content.res.TypedArray obtainAttributes(android.util.AttributeSet set,
int[] attrs)
@Implementation public String getQuantityString(int id, int quantity, Object... formatArgs) throws android.content.res.Resources.NotFoundException
android.content.res.Resources.NotFoundException@Implementation public String getQuantityString(int id, int quantity) throws android.content.res.Resources.NotFoundException
android.content.res.Resources.NotFoundException@Implementation public InputStream openRawResource(int id) throws android.content.res.Resources.NotFoundException
android.content.res.Resources.NotFoundException@Implementation
public android.content.res.AssetFileDescriptor openRawResourceFd(int id)
throws android.content.res.Resources.NotFoundException
android.content.res.Resources.NotFoundExceptionpublic void setDensity(float density)
public void setScaledDensity(float scaledDensity)
public void setDisplay(android.view.Display display)
@Implementation public android.util.DisplayMetrics getDisplayMetrics()
@HiddenApi
@Implementation
public android.content.res.XmlResourceParser loadXmlResourceParser(int id,
String type)
throws android.content.res.Resources.NotFoundException
android.content.res.Resources.NotFoundException@HiddenApi @Implementation public android.content.res.XmlResourceParser loadXmlResourceParser(String file, int id, int assetCookie, String type) throws android.content.res.Resources.NotFoundException
android.content.res.Resources.NotFoundException@Deprecated public org.robolectric.res.ResourceLoader getResourceLoader()
ShadowAssetManager.getResourceLoader();@Implementation public final android.content.res.Resources.Theme newTheme()
@HiddenApi
@Implementation
public android.graphics.drawable.Drawable loadDrawable(android.util.TypedValue value,
int id)
@Implementation
public android.graphics.drawable.Drawable loadDrawable(android.util.TypedValue value,
int id,
android.content.res.Resources.Theme theme)
throws android.content.res.Resources.NotFoundException
android.content.res.Resources.NotFoundExceptionCopyright © 2016. All rights reserved.