Here you can find the source of getBitmapImageById(Resources res, int id)
Parameter | Description |
---|---|
res | application resources object |
id | resource id |
public static Bitmap getBitmapImageById(Resources res, int id)
//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); } }