Show Image View from file path?

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?

14 Answers
14

Leave a Comment