public class ComparableGradientDrawable extends GradientDrawable implements ComparableDrawable
Modifier and Type | Field and Description |
---|---|
protected int |
color |
protected int[] |
colors |
protected ColorStateList |
colorStateList |
protected float[] |
cornerRadii |
protected float |
cornerRadius |
protected float |
gradientRadius |
protected int |
gradientType |
protected int |
height |
protected int |
shape |
protected int |
strokeColor |
protected ColorStateList |
strokeColorStateList |
protected float |
strokeDashGap |
protected float |
strokeDashWidth |
protected int |
strokeWidth |
protected int |
width |
Constructor and Description |
---|
ComparableGradientDrawable() |
ComparableGradientDrawable(GradientDrawable.Orientation orientation,
int[] colors) |
Modifier and Type | Method and Description |
---|---|
static ComparableGradientDrawable |
create() |
boolean |
equals(Object o) |
int |
hashCode() |
boolean |
isEquivalentTo(ComparableDrawable other) |
void |
setColor(ColorStateList color) |
void |
setColor(int color) |
void |
setColors(int[] colors) |
void |
setCornerRadii(float[] cornerRadii) |
void |
setCornerRadius(float cornerRadius) |
void |
setGradientRadius(float gradientRadius) |
void |
setGradientType(int gradientType) |
void |
setShape(int shape) |
void |
setSize(int width,
int height) |
void |
setStroke(int width,
ColorStateList colorStateList,
float dashWidth,
float dashGap) |
void |
setStroke(int width,
int color,
float dashWidth,
float dashGap) |
protected int color
protected ColorStateList colorStateList
protected int[] colors
protected float cornerRadius
protected float[] cornerRadii
protected int gradientType
protected float gradientRadius
protected int shape
protected int width
protected int height
protected int strokeWidth
protected float strokeDashWidth
protected float strokeDashGap
protected int strokeColor
protected ColorStateList strokeColorStateList
public ComparableGradientDrawable()
public ComparableGradientDrawable(GradientDrawable.Orientation orientation, int[] colors)
public static ComparableGradientDrawable create()
public boolean equals(Object o)
public int hashCode()
public boolean isEquivalentTo(ComparableDrawable other)
isEquivalentTo
in interface ComparableDrawable
other
- The other drawabletrue
iff this drawable is equivalent to the .public void setColor(int color)
public void setColor(ColorStateList color)
public void setColors(int[] colors)
public void setCornerRadius(float cornerRadius)
public void setCornerRadii(float[] cornerRadii)
public void setGradientType(int gradientType)
public void setGradientRadius(float gradientRadius)
public void setShape(int shape)
public void setSize(int width, int height)
public void setStroke(int width, int color, float dashWidth, float dashGap)
public void setStroke(int width, ColorStateList colorStateList, float dashWidth, float dashGap)