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 Modifier and Type Class Description static classShadowNativeBitmapDrawable.PickerShadow picker forBitmapDrawable.
-
Constructor Summary
Constructors Constructor Description ShadowNativeBitmapDrawable()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetCreatedFromResId()Returns the resource id that thisBitmapDrawablewas loaded from.protected voidsetCreatedFromResId(int createdFromResId, String resourceName)-
Methods inherited from class org.robolectric.shadows.ShadowBitmapDrawable
draw, getPath, getSource
-
Methods inherited from class org.robolectric.shadows.ShadowDrawable
createFromResourceId, getInputStream, invalidateSelf, validate, wasInvalidated
-
-
-
-
Method Detail
-
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
protected void setCreatedFromResId(int createdFromResId, String resourceName)- Overrides:
setCreatedFromResIdin classShadowBitmapDrawable
-
-