Placeholder and Error Handling
suggest changePicasso supports both download and error placeholders as optional features. Its also provides callbacks for handling the download result.
Picasso.with(context)
.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, new Callback(){
@Override
public void onSuccess() {}
@Override
public void onError() {}
});
A request will be retried three times before the error placeholder is shown.
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents