I need to get Bitmap and sound from assets. I try to do like this:
BitmapFactory.decodeFile(\"file:///android_asset/Files/Numbers/l1.png\");
<
Use this code its working
try {
InputStream bitmap=getAssets().open("icon.png");
Bitmap bit=BitmapFactory.decodeStream(bitmap);
img.setImageBitmap(bit);
} catch (IOException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
Update
While decoding Bitmap we more often meet with memory overflow exception if Image size is very big. So reading article How to display Image efficiently will help you.