com.xtremelabs.robolectric.shadows
Class ShadowBitmapDrawable

java.lang.Object
  extended by com.xtremelabs.robolectric.shadows.ShadowDrawable
      extended by com.xtremelabs.robolectric.shadows.ShadowBitmapDrawable

@Implements(value=android.graphics.drawable.BitmapDrawable.class)
public class ShadowBitmapDrawable
extends ShadowDrawable


Constructor Summary
ShadowBitmapDrawable()
           
 
Method Summary
 void draw(android.graphics.Canvas canvas)
          Draws the contained bitmap onto the canvas at 0,0 with a default Paint
 int getLoadedFromResourceId()
          Non-Android accessor that tells you the resource id that this BitmapDrawable was loaded from.
 
Methods inherited from class com.xtremelabs.robolectric.shadows.ShadowDrawable
createFromStream, getBounds, getIntrinsicHeight, getIntrinsicWidth, setBounds, setBounds, setIntrinsicHeight, setIntrinsicWidth
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ShadowBitmapDrawable

public ShadowBitmapDrawable()
Method Detail

draw

@Implementation
public void draw(android.graphics.Canvas canvas)
Draws the contained bitmap onto the canvas at 0,0 with a default Paint

Parameters:
canvas - the canvas to draw on

getLoadedFromResourceId

public int getLoadedFromResourceId()
Non-Android accessor that tells you the resource id that this BitmapDrawable was loaded from. This lets your tests assert that the bitmap is correct without having to actually load the bitmap.

Returns:
resource id from which this BitmapDrawable was loaded