Build 1.0_r1(from source)
Class PaintDrawable

  extended by
      extended by
          extended by

public class PaintDrawable
extends ShapeDrawable

Drawable that draws its bounds in the given paint, with optional rounded corners.

Nested Class Summary
Nested classes/interfaces inherited from class
ShapeDrawable.ShaderFactory, ShapeDrawable.ShapeState
Nested classes/interfaces inherited from class
Drawable.Callback, Drawable.ConstantState
Field Summary
Fields inherited from class
Constructor Summary
PaintDrawable(int color)
Method Summary
protected  boolean inflateTag(String name, Resources r, XmlPullParser parser, AttributeSet attrs)
          Subclasses override this to parse custom subelements.
 void setCornerRadii(float[] radii)
          Specify radii for each of the 4 corners.
 void setCornerRadius(float radius)
          Specify radius for the corners of the rectangle.
Methods inherited from class
draw, getChangingConfigurations, getConstantState, getIntrinsicHeight, getIntrinsicWidth, getOpacity, getPadding, getPaint, getShaderFactory, getShape, inflate, onBoundsChange, onDraw, setAlpha, setColorFilter, setDither, setIntrinsicHeight, setIntrinsicWidth, setPadding, setPadding, setShaderFactory, setShape
Methods inherited from class
clearColorFilter, copyBounds, copyBounds, createFromPath, createFromStream, createFromXml, createFromXmlInner, getBounds, getCurrent, getLevel, getMinimumHeight, getMinimumWidth, getState, getTransparentRegion, inflateWithAttributes, invalidateSelf, isStateful, isVisible, onLevelChange, 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

Constructor Detail


public PaintDrawable()


public PaintDrawable(int color)
Method Detail


public void setCornerRadius(float radius)
Specify radius for the corners of the rectangle. If this is > 0, then the drawable is drawn in a round-rectangle, rather than a rectangle.

radius - the radius for the corners of the rectangle


public void setCornerRadii(float[] radii)
Specify radii for each of the 4 corners. For each corner, the array contains 2 values, [X_radius, Y_radius]. The corners are ordered top-left, top-right, bottom-right, bottom-left

radii - the x and y radii of the corners


protected boolean inflateTag(String name,
                             Resources r,
                             XmlPullParser parser,
                             AttributeSet attrs)
Description copied from class: ShapeDrawable
Subclasses override this to parse custom subelements. If you handle it, return true, else return super.inflateTag(...).

inflateTag in class ShapeDrawable

Build 1.0_r1(from source)

Please submit a feedback, bug or feature