Package org.robolectric.shadows
Class ShadowGradientDrawable
- java.lang.Object
-
- org.robolectric.shadows.ShadowDrawable
-
- org.robolectric.shadows.ShadowGradientDrawable
-
@Implements(android.graphics.drawable.GradientDrawable.class) public class ShadowGradientDrawable extends ShadowDrawable
-
-
Constructor Summary
Constructors Constructor Description ShadowGradientDrawable()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getLastSetColor()
Returns the color of this drawable as set by the last call tosetColor(int color)
.int
getStrokeColor()
int
getStrokeWidth()
protected void
setColor(int color)
protected void
setStroke(int width, int color)
-
Methods inherited from class org.robolectric.shadows.ShadowDrawable
addCorruptStreamSource, clearCorruptStreamSources, createFromPath, createFromResourceId, createFromResourceStream, createFromStream, getAlpha, getCreatedFromResId, getInputStream, getIntrinsicHeight, getIntrinsicWidth, invalidateSelf, setAlpha, setDefaultIntrinsicHeight, setDefaultIntrinsicWidth, setIntrinsicHeight, setIntrinsicWidth, validate, wasInvalidated
-
-
-
-
Method Detail
-
setColor
@Implementation protected void setColor(int color)
-
setStroke
@Implementation protected void setStroke(int width, int color)
-
getLastSetColor
public int getLastSetColor()
Returns the color of this drawable as set by the last call tosetColor(int color)
.Note that this only works if the color is explicitly set with
setColor(int color)
. If the color of this drawable is set by another method, the result will be0
.
-
getStrokeWidth
public int getStrokeWidth()
-
getStrokeColor
public int getStrokeColor()
-
-