public class GradientDrawable extends Drawable
| Modifier and Type | Class and Description |
|---|---|
static class |
GradientDrawable.Orientation |
Drawable.Callback, Drawable.ConstantState| Modifier and Type | Field and Description |
|---|---|
static int |
LINE |
static int |
LINEAR_GRADIENT |
static int |
OVAL |
static int |
RADIAL_GRADIENT |
static int |
RECTANGLE |
static int |
RING |
static int |
SWEEP_GRADIENT |
| Constructor and Description |
|---|
GradientDrawable() |
GradientDrawable(GradientDrawable.Orientation orientation,
int[] colors) |
| Modifier and Type | Method and Description |
|---|---|
void |
draw(Canvas canvas) |
int |
getChangingConfigurations() |
Drawable.ConstantState |
getConstantState() |
int |
getIntrinsicHeight() |
int |
getIntrinsicWidth() |
int |
getOpacity() |
GradientDrawable.Orientation |
getOrientation() |
boolean |
getPadding(Rect padding) |
void |
inflate(Resources r,
org.xmlpull.v1.XmlPullParser parser,
AttributeSet attrs) |
Drawable |
mutate() |
protected void |
onBoundsChange(Rect r) |
protected boolean |
onLevelChange(int level) |
void |
setAlpha(int alpha) |
void |
setColor(int argb) |
void |
setColorFilter(ColorFilter cf) |
void |
setColors(int[] colors) |
void |
setCornerRadii(float[] radii) |
void |
setCornerRadius(float radius) |
void |
setDither(boolean dither) |
void |
setGradientCenter(float x,
float y) |
void |
setGradientRadius(float gradientRadius) |
void |
setGradientType(int gradient) |
void |
setOrientation(GradientDrawable.Orientation orientation) |
void |
setShape(int shape) |
void |
setSize(int width,
int height) |
void |
setStroke(int width,
int color) |
void |
setStroke(int width,
int color,
float dashWidth,
float dashGap) |
void |
setUseLevel(boolean useLevel) |
clearColorFilter, copyBounds, copyBounds, createFromPath, createFromResourceStream, createFromResourceStream, createFromStream, createFromXml, createFromXmlInner, getBounds, getCallback, getCurrent, getLevel, getMinimumHeight, getMinimumWidth, getState, getTransparentRegion, invalidateSelf, isStateful, isVisible, jumpToCurrentState, onStateChange, resolveOpacity, scheduleSelf, setBounds, setBounds, setCallback, setChangingConfigurations, setColorFilter, setFilterBitmap, setLevel, setState, setVisible, unscheduleSelfpublic static final int RECTANGLE
public static final int OVAL
public static final int LINE
public static final int RING
public static final int LINEAR_GRADIENT
public static final int RADIAL_GRADIENT
public static final int SWEEP_GRADIENT
public GradientDrawable()
public GradientDrawable(GradientDrawable.Orientation orientation, int[] colors)
public boolean getPadding(Rect padding)
getPadding in class Drawablepublic void setCornerRadii(float[] radii)
public void setCornerRadius(float radius)
public void setStroke(int width,
int color)
public void setStroke(int width,
int color,
float dashWidth,
float dashGap)
public void setSize(int width,
int height)
public void setShape(int shape)
public void setGradientType(int gradient)
public void setGradientCenter(float x,
float y)
public void setGradientRadius(float gradientRadius)
public void setUseLevel(boolean useLevel)
public GradientDrawable.Orientation getOrientation()
public void setOrientation(GradientDrawable.Orientation orientation)
public void setColors(int[] colors)
public void setColor(int argb)
public int getChangingConfigurations()
getChangingConfigurations in class Drawablepublic void setColorFilter(ColorFilter cf)
setColorFilter in class Drawablepublic int getOpacity()
getOpacity in class Drawableprotected void onBoundsChange(Rect r)
onBoundsChange in class Drawableprotected boolean onLevelChange(int level)
onLevelChange in class Drawablepublic void inflate(Resources r, org.xmlpull.v1.XmlPullParser parser, AttributeSet attrs) throws org.xmlpull.v1.XmlPullParserException, IOException
inflate in class Drawableorg.xmlpull.v1.XmlPullParserExceptionIOExceptionpublic int getIntrinsicWidth()
getIntrinsicWidth in class Drawablepublic int getIntrinsicHeight()
getIntrinsicHeight in class Drawablepublic Drawable.ConstantState getConstantState()
getConstantState in class DrawableCopyright © 2008-2013. All Rights Reserved.