Package org.robolectric.shadows
Class ShadowNativeBitmapDrawable
java.lang.Object
org.robolectric.shadows.ShadowDrawable
org.robolectric.shadows.ShadowBitmapDrawable
org.robolectric.shadows.ShadowNativeBitmapDrawable
@Implements(value=android.graphics.drawable.BitmapDrawable.class,
minSdk=26,
shadowPicker=Picker.class,
isInAndroidSdk=false)
public class ShadowNativeBitmapDrawable
extends ShadowBitmapDrawable
Disable the legacy ShadowBitmapDrawable as it fakes the draw logic.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintReturns the resource id that thisBitmapDrawablewas loaded from.protected voidsetCreatedFromResId(int createdFromResId, String resourceName) Methods inherited from class org.robolectric.shadows.ShadowBitmapDrawable
draw, getPath, getSourceMethods inherited from class org.robolectric.shadows.ShadowDrawable
createFromResourceId, getInputStream, invalidateSelf, validate, wasInvalidated
-
Constructor Details
-
ShadowNativeBitmapDrawable
public ShadowNativeBitmapDrawable()
-
-
Method Details
-
getCreatedFromResId
public int getCreatedFromResId()Description copied from class:ShadowBitmapDrawableReturns 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 classShadowBitmapDrawable- Returns:
- resource id from which this
BitmapDrawablewas loaded
-
setCreatedFromResId
- Overrides:
setCreatedFromResIdin classShadowBitmapDrawable
-