• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Display image from the Internet with ImageView?

I have an image view object declared in the main class for my app

ImageView iv = new InageView;

I am able to view a picture in the res/drawable folder but when I use setImageUri method, nothing appears.
 
I'm not sure exactly, but I get Drawables from the internet and set them in the ImageView using setImageDrawable. To get the drawable:

URL url = new URL(address);
InputStream content = (InputStream)url.getContent();
Drawable d = Drawable.createFromStream(content , "src");
 
Back
Top Bottom