Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Picasso loads image with triangle in corner of image

I'm using picasso library for loading images from server into my application. my problem is when image loaded it has a triangle in top-left corner of image with color(like blue,green,red). this is my code for loading image:

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);
                }
            });
}

the image shown is : the image that picasso loads in application

like image 356
Hossein Ahmadi Avatar asked Jan 24 '16 15:01

Hossein Ahmadi


2 Answers

You have enabled debug indicators on your Picasso instance (see official website). Look for setIndicatorsEnabled(true) in your code and remove it.

like image 59
patloew Avatar answered Dec 02 '22 10:12

patloew


You have setIndicatorsEnabled set to true

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

Check this: Is there any way from which we can detect images are loading from cache in picasso?

like image 24
Marcos Casagrande Avatar answered Dec 02 '22 10:12

Marcos Casagrande