how to set image from url for imageView

后端 未结 10 1762
礼貌的吻别
礼貌的吻别 2020-11-28 08:18

I wanna set Image in ImageView using Url for example I have this url

http://www.google.iq/imgres?hl=en&biw=1366&bih=667&tbm=isch&tbni

10条回答
  •  情歌与酒
    2020-11-28 08:51

    You can also let Square's Picasso library do the heavy lifting:

    Picasso
        .with(context)
        .load("http://...")
        .into(imageView);
    

    As a bonus, you get caching, transformations, and more.

提交回复
热议问题