Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import android.graphics.Bitmap;

import android.graphics.NinePatch;
import android.graphics.drawable.NinePatchDrawable;

public class Main {

    public static NinePatchDrawable createScalableDrawable(Bitmap pic) {
        NinePatch np = new NinePatch(pic, pic.getNinePatchChunk(), null);
        return new NinePatchDrawable(np);
    }
}