android.graphics.drawable
Class GradientDrawable
java.lang.Object
android.graphics.drawable.Drawable
android.graphics.drawable.GradientDrawable
public class GradientDrawable
- extends Drawable
Methods inherited from class android.graphics.drawable.Drawable |
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, unscheduleSelf |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RECTANGLE
public static final int RECTANGLE
- See Also:
- Constant Field Values
OVAL
public static final int OVAL
- See Also:
- Constant Field Values
LINE
public static final int LINE
- See Also:
- Constant Field Values
RING
public static final int RING
- See Also:
- Constant Field Values
LINEAR_GRADIENT
public static final int LINEAR_GRADIENT
- See Also:
- Constant Field Values
RADIAL_GRADIENT
public static final int RADIAL_GRADIENT
- See Also:
- Constant Field Values
SWEEP_GRADIENT
public static final int SWEEP_GRADIENT
- See Also:
- Constant Field Values
GradientDrawable
public GradientDrawable()
GradientDrawable
public GradientDrawable(GradientDrawable.Orientation orientation,
int[] colors)
getPadding
public boolean getPadding(Rect padding)
- Overrides:
getPadding
in class Drawable
setCornerRadii
public void setCornerRadii(float[] radii)
setCornerRadius
public void setCornerRadius(float radius)
setStroke
public void setStroke(int width,
int color)
setStroke
public void setStroke(int width,
int color,
float dashWidth,
float dashGap)
setSize
public void setSize(int width,
int height)
setShape
public void setShape(int shape)
setGradientType
public void setGradientType(int gradient)
setGradientCenter
public void setGradientCenter(float x,
float y)
setGradientRadius
public void setGradientRadius(float gradientRadius)
setUseLevel
public void setUseLevel(boolean useLevel)
draw
public void draw(Canvas canvas)
- Specified by:
draw
in class Drawable
setColor
public void setColor(int argb)
getChangingConfigurations
public int getChangingConfigurations()
- Overrides:
getChangingConfigurations
in class Drawable
setAlpha
public void setAlpha(int alpha)
- Specified by:
setAlpha
in class Drawable
setDither
public void setDither(boolean dither)
- Overrides:
setDither
in class Drawable
setColorFilter
public void setColorFilter(ColorFilter cf)
- Specified by:
setColorFilter
in class Drawable
getOpacity
public int getOpacity()
- Specified by:
getOpacity
in class Drawable
onBoundsChange
protected void onBoundsChange(Rect r)
- Overrides:
onBoundsChange
in class Drawable
onLevelChange
protected boolean onLevelChange(int level)
- Overrides:
onLevelChange
in class Drawable
inflate
public void inflate(Resources r,
org.xmlpull.v1.XmlPullParser parser,
AttributeSet attrs)
throws org.xmlpull.v1.XmlPullParserException,
IOException
- Overrides:
inflate
in class Drawable
- Throws:
org.xmlpull.v1.XmlPullParserException
IOException
getIntrinsicWidth
public int getIntrinsicWidth()
- Overrides:
getIntrinsicWidth
in class Drawable
getIntrinsicHeight
public int getIntrinsicHeight()
- Overrides:
getIntrinsicHeight
in class Drawable
getConstantState
public Drawable.ConstantState getConstantState()
- Overrides:
getConstantState
in class Drawable
mutate
public Drawable mutate()
- Overrides:
mutate
in class Drawable
Copyright © 2008-2012. All Rights Reserved.