Android

android.graphics.drawable.PaintDrawable

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

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

Summary

Public Constructors

            PaintDrawable()
            PaintDrawable(int color)

Public Methods

          void  setCornerRadii(float[] radii)
Specify radii for each of the 4 corners.
          void  setCornerRadius(float radius)
Specify radius for the corners of the rectangle.

Protected Methods

          boolean  inflateTag(String name, Resources r, XmlPullParser parser, AttributeSet attrs)
Subclasses override this to parse custom subelements.
Methods inherited from class android.graphics.drawable.ShapeDrawable
Methods inherited from class android.graphics.drawable.Drawable
Methods inherited from class java.lang.Object

Details

Public Constructors

public PaintDrawable()

public PaintDrawable(int color)

Public Methods

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

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

Protected Methods

protected boolean inflateTag(String name, Resources r, XmlPullParser parser, AttributeSet attrs)

Subclasses override this to parse custom subelements. If you handle it, return true, else return super.inflateTag(...).
Copyright 2007 Google Inc. Build 0.9_r1-98467 - 14 Aug 2008 18:48