Android毕加索无法正常工作

时间:2016-07-11 07:30:57

标签: android picasso

这是我的代码

Picasso.with(getActivity())
                  .load("https://dev.tfic.aviation.go.th/timthumb/?src=%2Fcontents%2Ftravel%2Fkrabi%2F190556-travel-02-03-mayha.jpg&w=684&h=342")
                  .placeholder(R.mipmap.placeholder)
                  .error(R.mipmap.placeholder)                      
                  .into(img);

1 个答案:

答案 0 :(得分:0)

检查一下。

  

的AndroidManifest.xml

<uses-permission android:name="android.permission.INTERNET"/>

在java中,

 Picasso.with(this)
.load("YOUR IMAGE URL HERE")
.placeholder(Your Drawable Resource) //this is optional the image to display while the url image is downloading
.error(Your Drawable Resource)         //this is also optional if some error has occurred in downloading the image this image would be displayed
.into(imageView);

这可能有助于你