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
createFromResourceStream(Resources res, TypedValue value, InputStream is, String srcName, BitmapFactory.Options opts)
protected static Drawable
createFromStream(InputStream is, String srcName)
protected int
getAlpha()
int
getCreatedFromResId()
InputStream
getInputStream()
protected int
getIntrinsicHeight()
protected int
getIntrinsicWidth()
protected void
invalidateSelf()
protected void
setAlpha(int alpha)
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
-
createFromResourceStream
@Implementation protected static Drawable createFromResourceStream(Resources res, TypedValue value, InputStream is, String srcName, BitmapFactory.Options opts) -
createFromPath
-
createFromResourceId
-
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
-
setAlpha
-
invalidateSelf
-
getAlpha
-
getCreatedFromResId
public int getCreatedFromResId() -
wasInvalidated
public boolean wasInvalidated() -
validate
public void validate()
-