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
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static DrawablecreateFromResourceId(int resourceId)Deprecated.useContextCompat.getDrawable(context, resourceId)intgetCreatedFromResId()InputStreamgetInputStream()protected voidinvalidateSelf()protected voidsetCreatedFromResId(int createdFromResId, String resourceName)voidvalidate()booleanwasInvalidated()
-
-
-
Method Detail
-
createFromResourceId
@Deprecated public static Drawable createFromResourceId(int resourceId)
Deprecated.useContextCompat.getDrawable(context, resourceId)Returns an invalid Drawable with the given the resource id.
-
setCreatedFromResId
protected void setCreatedFromResId(int createdFromResId, String resourceName)
-
getInputStream
public InputStream getInputStream()
-
invalidateSelf
@Implementation protected void invalidateSelf()
-
getCreatedFromResId
public int getCreatedFromResId()
-
wasInvalidated
public boolean wasInvalidated()
-
validate
public void validate()
-
-