Picasso.get().load("http://i.imgur.com/DvpvklR.png").into(imageView)
Run Code Online (Sandbox Code Playgroud)
在新版本的Picasso中,您不再需要上下文。我正在使用:
implementation 'com.squareup.picasso:picasso:2.71828'
Run Code Online (Sandbox Code Playgroud)
尝试这个
String img_url = "YOUR IMAGE URL";
if (!img_url.equalsIgnoreCase(""))
Picasso.with(context).load(img_url).placeholder(R.drawable.user_image)// Place holder image from drawable folder
.error(R.drawable.user_image).resize(110, 110).centerCrop()
.into("IMAGE VIEW ID WHERE YOU WANT TO SET IMAGE");
Run Code Online (Sandbox Code Playgroud)
快乐编码。
小智 6
在新版毕加索中使用了get()
毕加索最新版毕加索库:2.71828
Picasso
.get()
.load("You Img Path Place Here")
.resize(width, height)
.noFade()
.into("Path set ImageView");
Run Code Online (Sandbox Code Playgroud)
使用最新的毕加索版本
实现 'com.squareup.picasso:picasso:2.71828'
| 归档时间: |
|
| 查看次数: |
33979 次 |
| 最近记录: |