Photoview: Image stands still when zooming

Created on 30 Sep 2017  路  5Comments  路  Source: Baseflow/PhotoView

Updated from 1.2 to 2.0.0 and the following behaviour occurs: https://streamable.com/b8vxj
I zoom in on the imageview, I'm logging the scale value and I see that is changing and the zoom is fine, but the image stands still.

Would greatly appreciate some help as I can't seem to figure it out after 2 days. Thank you.

Most helpful comment

@keeblebogdan thanks for your quick response. I just changed imageView scale type and my problem solved:
imageView.setScaleType(ImageView.ScaleType.MATRIX);

All 5 comments

I have the same problem, How did you resolve this?

got the solution here

If i remember correctly, i changed the public void onMatrixChanged(RectF rect) function.

Version 1.2: mAttacher.getDisplayMatrix(displayMatrix);
Version 2.0.0: Matrix displayMatrix = new Matrix(); mAttacher.getSuppMatrix(displayMatrix);

Plus my TaggableImageView had scaleType="fitXY" in previous version. Now scaleType="matrix".
Hope this helps you.

@keeblebogdan thanks for your quick response. I just changed imageView scale type and my problem solved:
imageView.setScaleType(ImageView.ScaleType.MATRIX);

@divysoni3 - Thank you. Your solution worked for me. :) 馃憤

Was this page helpful?
0 / 5 - 0 ratings