使用 Picasso 加载图像,在角落显示颜色

Loading image using Picasso showing colors in corners

我用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?

代码:

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

在你的 picasso 对象中设置 picasso.setIndicatorsEnabled(false);

红色颜色表示图像是从网络.

中获取的

绿色 颜色表示图像是从高速缓存.

中获取的

蓝色 颜色表示图像是从 磁盘存储器.

中获取的

picasso.setDebugging(true); 已弃用

使用picasso.setLoggingEnabled(true);

您必须通过调用方法 picasso.setIndicatorsEnabled(false)

来禁用指标

色带是为了显示图片来源。希望对你有帮助

检查这个link,在调试指示器下他们已经清楚地提到了它

这是 picasso 显示的调试指示器,用于指示图像是来自网络、磁盘还是内存。您可以在 http://square.github.io/picasso/ '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.