<!-- lang: java -->
/**
* 从Assets中读取图片
*/
private Bitmap getImageFromAssetsFile(String fileName, Context context) {
Bitmap image = null;
AssetManager am = context.getResources().getAssets();
try {
InputStream is = am.open(fileName);
image = BitmapFactory.decodeStream(is);
is.close();
} catch (IOException e) {
e.printStackTrace();
}
转载于:https://my.oschina.net/aibenben/blog/183348