Android Picasso Cancelling Image Requests using Picasso

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Insert
> Step 2: And Like the video. BONUS: You can also share it!

Example

In certain cases we need to cancel an image download request in Picasso before the download has completed.

This could happen for various reasons, for example if the parent view transitioned to some other view before the image download could be completed.

In this case, you can cancel the image download request using the cancelRequest() method:

ImageView imageView; 

//......

Picasso.with(imageView.getContext()).cancelRequest(imageView);


Got any Android Question?