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 -
Method Summary
Modifier and TypeMethodDescriptionintReturns the color of this drawable as set by the last call tosetColor(int color).protected intgetShape()intfloatfloatintprotected voidsetColor(int color) protected voidsetShape(int shape) protected voidsetStroke(int width, int color) protected voidsetStroke(int width, int color, float dashWidth, float dashGap) protected voidsetStroke(int width, ColorStateList colorStateList) protected voidsetStroke(int width, ColorStateList colorStateList, float dashWidth, float dashGap) Methods inherited from class org.robolectric.shadows.ShadowDrawable
createFromResourceId, getCreatedFromResId, getInputStream, invalidateSelf, setCreatedFromResId, validate, wasInvalidated
-
Constructor Details
-
ShadowGradientDrawable
public ShadowGradientDrawable()
-
-
Method Details
-
setColor
-
setShape
-
setStroke
-
setStroke
@Filter protected void setStroke(int width, ColorStateList colorStateList, float dashWidth, float dashGap) -
setStroke
-
setStroke
-
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. -
getShape
-
getStrokeWidth
public int getStrokeWidth() -
getStrokeColor
public int getStrokeColor() -
getStrokeColorStateList
-
getStrokeDashWidth
public float getStrokeDashWidth() -
getStrokeDashGap
public float getStrokeDashGap()
-