Picasso load drawable resources from their URI

前端 未结 5 1537
北荒
北荒 2020-11-30 06:46

I have to show a drawable from res into an ImageView. In this app, I\'m using Picasso for some reasons.

In this case, I need t

5条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-11-30 07:07

    As mentioned in the documentation of Picasso .

    they are now supporting loading Image from URI like the following :

    load(android.net.Uri uri) 
    

    so you have to do something like the following :

    Picasso.with(context).load(uri).into(imageView); 
    

    just like what you are doing already .

    Hopethat helps .

提交回复
热议问题