Android, Make an image at a URL equal to ImageView's image

android

Solution

To download an image and set it as content for an imageview

try {
  ImageView i = (ImageView)findViewById(R.id.image);
  Bitmap bitmap = BitmapFactory.decodeStream((InputStream)new URL(imageUrl).getContent());
  i.setImageBitmap(bitmap); 
} catch (MalformedURLException e) {
  e.printStackTrace();
} catch (IOException e) {
  e.printStackTrace();
}

Problem

I'm wondering how would I make an image that is located at a specific URL equal to an ImageView's image?

Original source