Package org.robolectric.shadows
Class ShadowDrawable
java.lang.Object
org.robolectric.shadows.ShadowDrawable
- Direct Known Subclasses:
ShadowBitmapDrawable
,ShadowGradientDrawable
,ShadowNativeAnimatedImageDrawable
,ShadowNativeAnimatedVectorDrawable
,ShadowNativeVectorDrawable
,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 Drawable
createFromResourceId(int resourceId)
Deprecated.useContextCompat.getDrawable(context, resourceId)
int
getCreatedFromResId()
InputStream
getInputStream()
protected void
invalidateSelf()
protected void
setCreatedFromResId(int createdFromResId, String resourceName)
void
validate()
boolean
wasInvalidated()
-
Constructor Details
-
ShadowDrawable
public ShadowDrawable()
-
-
Method Details
-
createFromResourceId
Deprecated.useContextCompat.getDrawable(context, resourceId)
Returns an invalid Drawable with the given the resource id. -
setCreatedFromResId
-
getInputStream
-
invalidateSelf
-
getCreatedFromResId
public int getCreatedFromResId() -
wasInvalidated
public boolean wasInvalidated() -
validate
public void validate()
-