Loading image using Picasso showing colors in corners
Asked Answered
C

3

5

I use Picasso library for loading images in my app. But in some images,it shows a colored corner.See the red color in attached image. Does anyone know why this happens? How to sort this out?See the red color here

Code:

Picasso picasso = Picasso.with(getActivity());
        picasso.setDebugging(true);
        picasso.load(downloadPath+imgDetailPhoto)
                .placeholder(R.drawable.no_image)
                .error(R.drawable.no_image)
                .into(eventImage, new Callback() {
                    @Override
                    public void onSuccess() {

                    }

                    @Override
                    public void onError() {
                        Log.d("Error...", "picasso load error");
                        Picasso.with(getActivity()).load(R.drawable.no_image).into(eventImage);
                    }
                });
Cotillion answered 30/11, 2015 at 12:55 Comment(3)
where is your code ?Sheathe
Please see the updated questionCotillion
set picasso.setIndicatorsEnabled(false); in your picasso objectDrillmaster
D
14

Set picasso.setIndicatorsEnabled(false); in your picasso object.

Red color indicates that image is fetched from network.

Green color indicates that image is fetched from cache memory.

Blue color indicates that image is fetched from disk memory.

picasso.setDebugging(true); is deprecated

use picasso.setLoggingEnabled(true);

Drillmaster answered 30/11, 2015 at 13:2 Comment(1)
+! for the detailed answer. This solved my issue :) Thanks a ton dude :)Cotillion
S
3

you have to disable indicators by calling the method picasso.setIndicatorsEnabled(false)

the ribbon is mean to show the image source. hope it helps

check this link, under the Debug Indicators they've mentioned it clearly

Sheathe answered 30/11, 2015 at 13:8 Comment(2)
Thanks for the answer :)Cotillion
There is no relation b/w debugging mode and indicators. Indicators only works if only you set setIndicatorsEnabled(true) not on debugging mode. checked on picasso 2.5.2.Drillmaster
T
2

That's a debug indicator displayed by picasso to indicate whether the image is comming from the network, disk or memory. You can check it here http://square.github.io/picasso/ under 'Debug Indicators'

For development you can enable the display of a colored ribbon which indicates the image source. Call setIndicatorsEnabled(true) on the Picasso instance.

Tissue answered 30/11, 2015 at 13:10 Comment(1)
Thanks for the answer :)Cotillion

© 2022 - 2024 — McMap. All rights reserved.