Picasso shows the blue red and green arrows on the top corner

I am using picasso to run an image in imageView.

Here is the code

ImageUtils.setImageFromUrl(app.selectedRing.getMainPicture(), imageView, MainActivity.this); public static void setImageFromUrl(final String url, final ImageView imgView, final Context mContext) { Picasso.with(mContext) .load(url) .networkPolicy(NetworkPolicy.OFFLINE) .fit().centerInside().placeholder(null) .into(imgView, new Callback() { @Override public void onSuccess() { } @Override public void onError() { Picasso.with(mContext) .load(url) .fit().centerInside() .into(imgView, new Callback() { @Override public void onSuccess() { } @Override public void onError() { } }); } }); } 

What i get enter image description here The problem is the blue arrow in the upper left corner, sometimes its red / green. I've never seen this before. and him on all images.

What's happening.

+2
source share
1 answer

Use picasso.setIndicatorsEnabled(false)

 Picasso.with(mContext) .load(url) .networkPolicy(NetworkPolicy.OFFLINE) .setIndicatorsEnabled(false) .fit().centerInside().placeholder(null) .into(imgView, new Callback() { @Override public void onSuccess() { } @Override public void onError() { Picasso.with(mContext) .load(url) .fit().centerInside() .into(imgView, new Callback() { @Override public void onSuccess() { } @Override public void onError() { } }); } }); 

The color indicates the source of the displayed image.

Color

Red indicates that the image is selected from the network .

Color

Green indicates that the image is being retrieved from the cache .

Color

Blue indicates that the image is being ejected from disk .

+6
source

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


All Articles