Search code examples
androidbitmapimageview

How to load an ImageView by URL in Android?


How do you use an image referenced by URL in an ImageView?


Solution

  • Anyway people ask my comment to post it as answer. i am posting.

    URL newurl = new URL(photo_url_str); 
    mIcon_val = BitmapFactory.decodeStream(newurl.openConnection().getInputStream());
    profile_photo.setImageBitmap(mIcon_val);