Code example for NinePatchDrawable

Methods: getPadding

0
        Bitmap bitmap = JarResources.getBitmap(context, "balloon.9.png",
            MapBalloonView.class.getPackage().getName());
        byte[] chunk = bitmap.getNinePatchChunk();
        Rect padding = new Rect(8, 8, 8, 32);
 
        NinePatchDrawable drawable = new NinePatchDrawable(
                context.getResources(), bitmap, chunk, padding,
                "balloon.9.png"); 
        imagePadding = new Rect();
        drawable.getPadding(imagePadding);
        layout.setBackgroundDrawable(drawable);
 
        createFields(context, layout);
 
        return layout;
    } 
 
 
    // ---------------------------------------------------------- 
    private void createFields(Context context, ViewGroup parent)
Experience pair programming with AI  Get Codota for Java