Java tutorial
//package com.java2s; import java.io.IOException; import java.io.InputStream; import android.content.res.AssetManager; import android.graphics.drawable.Drawable; public class Main { public static Drawable loadImage(String name, AssetManager assetManager) { try { InputStream ims = assetManager.open(name); return Drawable.createFromStream(ims, null); } catch (IOException ex) { //throw new RuntimeException( "Image " + name + " could not be loaded" ); return null; } } }