Back to project page Android-Advanced-ImageView.
The source code is released under:
GNU General Public License
If you think the Android project Android-Advanced-ImageView listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.appsdk.advancedimageview.util; /* w ww. jav a 2s . c o m*/ import java.io.InputStream; import android.content.Context; import android.content.res.AssetManager; import android.graphics.Bitmap; import android.graphics.BitmapFactory; public class AssetsManager { public static Bitmap getImageFromAssetsFile(Context context, String fileName) { Bitmap bitmap = null; AssetManager assetManager = context.getResources().getAssets(); try { InputStream is = assetManager.open(fileName); bitmap = BitmapFactory.decodeStream(is, null, null); is.close(); } catch (Exception e) { return null; } return bitmap; } }