Placeholder and Error Handling

suggest change

Picasso 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.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents