Build 1.0_r1(from source)

android.graphics.drawable
Class PaintDrawable

java.lang.Object
  extended by android.graphics.drawable.Drawable
      extended by android.graphics.drawable.ShapeDrawable
          extended by android.graphics.drawable.PaintDrawable

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 android.graphics.drawable.ShapeDrawable
ShapeDrawable.ShaderFactory, ShapeDrawable.ShapeState
 
Nested classes/interfaces inherited from class android.graphics.drawable.Drawable
Drawable.Callback, Drawable.ConstantState
 
Field Summary
 
Fields inherited from class android.graphics.drawable.Drawable
mCallback
 
Constructor Summary
PaintDrawable()
           
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 android.graphics.drawable.ShapeDrawable
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 android.graphics.drawable.Drawable
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

PaintDrawable

public PaintDrawable()

PaintDrawable

public PaintDrawable(int color)
Method Detail

setCornerRadius

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.

Parameters:
radius - the radius for the corners of the rectangle

setCornerRadii

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

Parameters:
radii - the x and y radii of the corners

inflateTag

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(...).

Overrides:
inflateTag in class ShapeDrawable

Build 1.0_r1(from source)

Please submit a feedback, bug or feature