Package org.robolectric.shadows
Class ShadowDrawable
java.lang.Object
org.robolectric.shadows.ShadowDrawable
- Direct Known Subclasses:
ShadowBitmapDrawable
,ShadowGradientDrawable
,ShadowStateListDrawable
,ShadowVectorDrawable
@Implements(android.graphics.drawable.Drawable.class) public class ShadowDrawable extends Object
-
Constructor Summary
Constructors Constructor Description ShadowDrawable()
-
Method Summary
Modifier and Type Method Description static void
addCorruptStreamSource(String src)
static void
clearCorruptStreamSources()
protected static Drawable
createFromPath(String pathName)
static Drawable
createFromResourceId(int resourceId)
protected static Drawable
createFromStream(InputStream is, String srcName)
int
getCreatedFromResId()
InputStream
getInputStream()
protected int
getIntrinsicHeight()
protected int
getIntrinsicWidth()
protected void
invalidateSelf()
protected void
setCreatedFromResId(int createdFromResId, String resourceName)
static void
setDefaultIntrinsicHeight(int defaultIntrinsicHeight)
static void
setDefaultIntrinsicWidth(int defaultIntrinsicWidth)
void
setIntrinsicHeight(int intrinsicHeight)
void
setIntrinsicWidth(int intrinsicWidth)
void
validate()
boolean
wasInvalidated()
-
Constructor Details
-
ShadowDrawable
public ShadowDrawable()
-
-
Method Details
-
createFromStream
-
createFromPath
-
createFromResourceId
-
setCreatedFromResId
-
getIntrinsicWidth
-
getIntrinsicHeight
-
addCorruptStreamSource
-
clearCorruptStreamSources
-
setDefaultIntrinsicWidth
public static void setDefaultIntrinsicWidth(int defaultIntrinsicWidth) -
setDefaultIntrinsicHeight
public static void setDefaultIntrinsicHeight(int defaultIntrinsicHeight) -
setIntrinsicWidth
public void setIntrinsicWidth(int intrinsicWidth) -
setIntrinsicHeight
public void setIntrinsicHeight(int intrinsicHeight) -
getInputStream
-
invalidateSelf
-
getCreatedFromResId
public int getCreatedFromResId() -
wasInvalidated
public boolean wasInvalidated() -
validate
public void validate()
-