I need to show an image by using the file name only, not from the resource id.
ImageView imgView = new ImageView(this);
imgView.setBackgroundResource(R.drawable.img1);
I have the image img1 in the drawable folder. I wish to show that image from the file.
How can I do this?
From the official site: http://developer.android.com/training/displaying-bitmaps/load-bitmap.html
Here the methods:
You can use:
You can also use:
This does the bitmap decoding implicit for you.
if you are using image loading in List view then use Aquery concept .
https://github.com/AshishPsaini/AqueryExample
I think you can use this
You may use this to access a specific folder and get particular image
And then you can call it by