Picasso uploads an image with a triangle in the corner of the image

I use picasso library to upload images from the server to my application. my problem is that when loading the image it has a triangle in the upper left corner of the image with color (e.g. blue, green, red). this is my image upload code:

public static void loadDynamicImage(final String url, final Context context, final ImageView imageView, final int width, final int height){ Picasso.with(context).load(url) .networkPolicy(NetworkPolicy.OFFLINE) .resize(width,height) .onlyScaleDown() .into(imageView, new Callback() { @Override public void onSuccess() { } @Override public void onError() { Picasso.with(context).load(url).resize(width,height).onlyScaleDown().into(imageView); } }); } 

image shown: the image that picasso loads in the application

+5
source share
2 answers

You have activated debug indicators on your Picasso instance (see the official website ). Find setIndicatorsEnabled(true) in your code and remove it.

+17
source

You have setIndicatorsEnabled set to true

 Picasso picasso = Picasso.with(this); picasso.setIndicatorsEnabled(false); //Or remove picasso.setIndicatorsEnabled(true); 

Check this: Is there a way by which we can detect that images are being loaded from the cache in picasso?

+3
source

Source: https://habr.com/ru/post/1241356/


All Articles