diff options
author | Andrew Dolgov <[email protected]> | 2012-12-02 23:16:31 +0400 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2012-12-02 23:16:31 +0400 |
commit | 63f182c2aa7037c5f98cc2f086a99b5ae0730fa6 (patch) | |
tree | 4abf9ac31053ddfded5a8891c42b0a65055ee622 /src | |
parent | 774f96af14671e587d48821f4d4751ccd6000050 (diff) |
imageviewtouchbase scale positioning workaround
Diffstat (limited to 'src')
-rw-r--r-- | src/it/sephiroth/android/library/imagezoom/ImageViewTouchBase.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/it/sephiroth/android/library/imagezoom/ImageViewTouchBase.java b/src/it/sephiroth/android/library/imagezoom/ImageViewTouchBase.java index 3213fb2..51dce5b 100644 --- a/src/it/sephiroth/android/library/imagezoom/ImageViewTouchBase.java +++ b/src/it/sephiroth/android/library/imagezoom/ImageViewTouchBase.java @@ -39,7 +39,7 @@ public class ImageViewTouchBase extends ImageView implements IDisposable { protected final float[] mMatrixValues = new float[9]; protected int mThisWidth = -1, mThisHeight = -1; protected boolean mFitToScreen = false; - final protected float MAX_ZOOM = 4.0f; + final protected float MAX_ZOOM = 2.0f; protected RectF mBitmapRect = new RectF(); protected RectF mCenterRect = new RectF(); @@ -290,8 +290,8 @@ public class ImageViewTouchBase extends ImageView implements IDisposable { float w = bitmap.getIntrinsicWidth(); float h = bitmap.getIntrinsicHeight(); matrix.reset(); - float widthScale = Math.min( viewWidth / w, MAX_ZOOM ); - float heightScale = Math.min( viewHeight / h, MAX_ZOOM ); + float widthScale = viewWidth / w; //Math.min( viewWidth / w, MAX_ZOOM ); + float heightScale = viewHeight / h; //Math.min( viewHeight / h, MAX_ZOOM ); float scale = Math.min( widthScale, heightScale ); matrix.postScale( scale, scale ); matrix.postTranslate( ( viewWidth - w * scale ) / MAX_ZOOM, ( viewHeight - h * scale ) / MAX_ZOOM ); |