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
All Methods Static Methods Instance Methods Concrete Methods 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()
-
-
-
Method Detail
-
createFromStream
@Implementation protected static Drawable createFromStream(InputStream is, String srcName)
-
createFromResourceStream
@Implementation protected static Drawable createFromResourceStream(Resources res, TypedValue value, InputStream is, String srcName, BitmapFactory.Options opts)
-
createFromPath
@Implementation protected static Drawable createFromPath(String pathName)
-
createFromResourceId
public static Drawable createFromResourceId(int resourceId)
-
getIntrinsicWidth
@Implementation protected int getIntrinsicWidth()
-
getIntrinsicHeight
@Implementation protected int getIntrinsicHeight()
-
addCorruptStreamSource
public static void addCorruptStreamSource(String src)
-
clearCorruptStreamSources
@Resetter public static void 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
public InputStream getInputStream()
-
setAlpha
@Implementation protected void setAlpha(int alpha)
-
invalidateSelf
@Implementation protected void invalidateSelf()
-
getAlpha
@Implementation(minSdk=19) protected int getAlpha()
-
getCreatedFromResId
public int getCreatedFromResId()
-
wasInvalidated
public boolean wasInvalidated()
-
validate
public void validate()
-
-