Dear All,
I need to display an image by specifying the file name instead of by using resource. E.g showImage("background.png") instead of showImage(R.drawable.background).
Any one knows how?
Thanks a lot.
Dear All,
I need to display an image by specifying the file name instead of by using resource. E.g showImage("background.png") instead of showImage(R.drawable.background).
Any one knows how?
Thanks a lot.
Read this Android Image Tutorial. There's an example that uses FileOutputStream to write an image, I'm sure there's FileInputStream, too. Here's another code example that downloads images and transforms them to an Inputstream that is decoded:
bmImg = BitmapFactory.decodeStream(is);
imView.setImageBitmap(bmImg);