Picasso New Version 2.5.2: Not Working with Transformation

孤街醉人 提交于 2019-12-06 11:35:15

I think you should use the following instead:

        public ImageTransformation(ImageView imageView) {
            this.maxWidth = imageView.getLayoutParams().width; //imageView.getWidth();
            this.maxHeight = imageView.getLayoutParams().height; //imageView.getHeight();
            // check
            if (this.maxWidth <= 0) {
                this.maxWidth = ...
            }
            if (this.maxHeight <= 0) {
                this.maxHeight = ...
            }
        }

About the exception, actually, ver 2.3.2 also got it, however, it has different way to process the exception. You can see 2 following screenshots:

Ver 2.3.2:

Ver 2.5.2:

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!