From 531245b48693b192bfbf9c723e6495c11b4ca9da Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 4 Feb 2019 08:10:15 +0300 Subject: photo attacher: hack CENTER_CROP to behave more like fit to width --- .../main/java/com/github/chrisbanes/photoview/PhotoViewAttacher.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'org.fox.ttcomics') diff --git a/org.fox.ttcomics/src/main/java/com/github/chrisbanes/photoview/PhotoViewAttacher.java b/org.fox.ttcomics/src/main/java/com/github/chrisbanes/photoview/PhotoViewAttacher.java index faf3491..a29b4ba 100755 --- a/org.fox.ttcomics/src/main/java/com/github/chrisbanes/photoview/PhotoViewAttacher.java +++ b/org.fox.ttcomics/src/main/java/com/github/chrisbanes/photoview/PhotoViewAttacher.java @@ -609,7 +609,7 @@ public class PhotoViewAttacher implements View.OnTouchListener, (viewHeight - drawableHeight) / 2F); } else if (mScaleType == ScaleType.CENTER_CROP) { - float scale = Math.max(widthScale, heightScale); + float scale = widthScale; //Math.max(widthScale, heightScale); mBaseMatrix.postScale(scale, scale); /*mBaseMatrix.postTranslate((viewWidth - drawableWidth * scale) / 2F, -- cgit v1.2.3