NinePatchDrawable.javaAPI DocAndroid 1.5 API3091Wed May 06 22:42:02 BST


public class NinePatchDrawable extends

Fields Summary
Constructors Summary
NinePatchDrawable( ninePatch)

        m9Patch = ninePatch;
Methods Summary
public voiddraw( canvas)

        if (canvas instanceof BridgeCanvas) {
            BridgeCanvas bridgeCanvas = (BridgeCanvas)canvas;
            Rect r = getBounds();
            m9Patch.draw(bridgeCanvas.getGraphics2d(), r.left,, r.width(), r.height());

        throw new UnsupportedOperationException();
public intgetIntrinsicHeight()
Return the intrinsic height of the underlying drawable object. Returns -1 if it has no intrinsic height, such as with a solid color.

        return m9Patch.getHeight();
public intgetIntrinsicWidth()
Return the intrinsic width of the underlying drawable object. Returns -1 if it has no intrinsic width, such as with a solid color.

        return m9Patch.getWidth();
public intgetMinimumHeight()

        return m9Patch.getHeight();
public intgetMinimumWidth()

        return m9Patch.getWidth();
public intgetOpacity()

        // FIXME
        return 0xFF;
public booleangetPadding( padding)
Return in padding the insets suggested by this Drawable for placing content inside the drawable's bounds. Positive values move toward the center of the Drawable (set Rect.inset). Returns true if this drawable actually has a padding, else false. When false is returned, the padding is always set to 0.

        int[] padd = new int[4];
        padding.left = padd[0]; = padd[1];
        padding.right = padd[2];
        padding.bottom = padd[3];
        return true;
public voidsetAlpha(int arg0)

        // FIXME !
public voidsetColorFilter( arg0)

        // FIXME