Android examples for Graphics:Bitmap Resource
get resource Bitmap Size
//package com.java2s; import android.content.Context; import android.graphics.BitmapFactory; public class Main { public static BitmapFactory.Options getSize(Context c, int resId) { android.graphics.BitmapFactory.Options o = new android.graphics.BitmapFactory.Options(); o.inJustDecodeBounds = true;/*from w w w .j ava 2 s. co m*/ BitmapFactory.decodeResource(c.getResources(), resId, o); return o; } }