Code example for RoundRectShape

0
        return drawable;
    } 
 
    Shape getDrawableShape() {
        final float[] roundedCorners = new float[] { 5, 5, 5, 5, 5, 5, 5, 5 };
        return new RoundRectShape(roundedCorners, null, null);
    } 
 
    /** 
     * Convert a AnimationDrawable for use as a barberpole animation. 
     * Each frame of the animation is wrapped in a ClipDrawable and 
     * given a tiling BitmapShader. 
     */ 
    private Drawable tileifyIndeterminate(Drawable drawable) {
        if (drawable instanceof AnimationDrawable) {
            AnimationDrawable background = (AnimationDrawable) drawable;
            final int N = background.getNumberOfFrames();
            AnimationDrawable newBg = new AnimationDrawable();
            newBg.setOneShot(background.isOneShot());
 
            for (int i = 0; i < N; i++) {