Android Resources Load getBitmapImageById(Resources res, int id)

Here you can find the source of getBitmapImageById(Resources res, int id)

Description

load image from application resources

Parameter

Parameter Description
res application resources object
id resource id

Return

requested Bitmap

Declaration

public static Bitmap getBitmapImageById(Resources res, int id) 

Method Source Code

//package com.java2s;

import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;

public class Main {
    /**/*from  w w w .ja va 2 s. c  om*/
     * load image from application resources
     * 
     * @param res
     *            application resources object
     * @param id
     *            resource id
     * @return requested Bitmap
     */
    public static Bitmap getBitmapImageById(Resources res, int id) {
        return BitmapFactory.decodeResource(res, id);
    }
}