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.drawa
You can also use:
File imgFile = new File(“filepath”); if(imgFile.exists()) { ImageView myImage = new ImageView(this); myImage.setImageURI(Uri.fromFile(imgFile)); }
This does the bitmap decoding implicit for you.