Android examples for Graphics:Bitmap Asset
load Bitmap From Assets
//package com.java2s; import android.content.Context; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import java.io.IOException; import java.io.InputStream; public class Main { public static Bitmap loadBitmapFromAssets(Context context, String name) { try {//from w w w . ja v a 2 s . c om InputStream is = context.getAssets().open(name); Bitmap bitmap = BitmapFactory.decodeStream(is); return bitmap; } catch (IOException e) { e.printStackTrace(); } return null; } }