I am trying to load an image from the asset folder and then set it to an ImageView. I know it\'s much better if I use the R.id.* for t
asset
ImageView
R.id.*
Here you are,
public Bitmap getBitmapFromAssets(String fileName) { AssetManager assetManager = getAssets(); InputStream istr = assetManager.open(fileName); Bitmap bitmap = BitmapFactory.decodeStream(istr); istr.close(); return bitmap; }