Package org.robolectric.shadows
Class ShadowBitmapDrawable
- java.lang.Object
- 
- org.robolectric.shadows.ShadowDrawable
- 
- org.robolectric.shadows.ShadowBitmapDrawable
 
 
- 
 @Implements(android.graphics.drawable.BitmapDrawable.class) public class ShadowBitmapDrawable extends ShadowDrawable 
- 
- 
Constructor SummaryConstructors Constructor Description ShadowBitmapDrawable()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected voiddraw(Canvas canvas)Draws the contained bitmap onto the canvas at 0,0 with a defaultPaintintgetCreatedFromResId()Deprecated.use ShadowBitmap#getCreatedFromResId() instead.StringgetPath()StringgetSource()protected Drawablemutate()protected voidsetColorFilter(ColorFilter colorFilter)- 
Methods inherited from class org.robolectric.shadows.ShadowDrawableaddCorruptStreamSource, clearCorruptStreamSources, createFromPath, createFromResourceId, createFromResourceStream, createFromStream, getAlpha, getInputStream, getIntrinsicHeight, getIntrinsicWidth, invalidateSelf, setAlpha, setDefaultIntrinsicHeight, setDefaultIntrinsicWidth, setIntrinsicHeight, setIntrinsicWidth, validate, wasInvalidated
 
- 
 
- 
- 
- 
Method Detail- 
draw@Implementation protected void draw(Canvas canvas) Draws the contained bitmap onto the canvas at 0,0 with a defaultPaint- Parameters:
- canvas- the canvas to draw on
 
 - 
mutate@Implementation protected Drawable mutate() 
 - 
setColorFilter@Implementation protected void setColorFilter(ColorFilter colorFilter) 
 - 
getCreatedFromResId@Deprecated public int getCreatedFromResId() Deprecated.use ShadowBitmap#getCreatedFromResId() instead.Returns the resource id that thisBitmapDrawablewas loaded from. This lets your tests assert that the bitmap is correct without having to actually load the bitmap.- Overrides:
- getCreatedFromResIdin class- ShadowDrawable
- Returns:
- resource id from which this BitmapDrawablewas loaded
 
 - 
getSourcepublic String getSource() 
 - 
getPathpublic String getPath() 
 
- 
 
-