Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;

public class Main {
    /**
     * Return a Bitmap from an Android resource id (e.g. R.drawable...)
     * @param ctx
     * @param bitmapId
     * @return Bitmap 
     */
    public static Bitmap makeBitmap(Context ctx, int bitmapId) {
        return (BitmapFactory.decodeResource(ctx.getResources(), bitmapId));
    }
}