Package org.robolectric.shadows
Class ShadowBitmapDrawable
java.lang.Object
org.robolectric.shadows.ShadowDrawable
org.robolectric.shadows.ShadowBitmapDrawable
- Direct Known Subclasses:
- ShadowNativeBitmapDrawable
@Implements(android.graphics.drawable.BitmapDrawable.class)
public class ShadowBitmapDrawable
extends ShadowDrawable
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected voidDraws the contained bitmap onto the canvas at 0,0 with a defaultPaintintDeprecated.use ShadowBitmap#getCreatedFromResId() instead.getPath()protected voidsetCreatedFromResId(int createdFromResId, String resourceName) Methods inherited from class org.robolectric.shadows.ShadowDrawablecreateFromResourceId, getInputStream, invalidateSelf, validate, wasInvalidated
- 
Constructor Details- 
ShadowBitmapDrawablepublic ShadowBitmapDrawable()
 
- 
- 
Method Details- 
drawDraws the contained bitmap onto the canvas at 0,0 with a defaultPaint- Parameters:
- canvas- the canvas to draw on
 
- 
setCreatedFromResId- Overrides:
- setCreatedFromResIdin class- ShadowDrawable
 
- 
getCreatedFromResIdDeprecated.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
 
- 
getSource
- 
getPath
 
-