create InsertDrawable - Android Graphics

Android examples for Graphics:Drawable Operation

Description

create InsertDrawable

Demo Code


//package com.java2s;

import android.graphics.Rect;
import android.graphics.drawable.Drawable;

import android.graphics.drawable.InsetDrawable;

public class Main {
    public static InsetDrawable createInsertDrawable(Drawable drawable,
            Rect rect) {// ww w . j a v  a2s .  c o  m
        return new InsetDrawable(drawable, rect.left, rect.top, rect.right,
                rect.bottom);
    }
}

Related Tutorials