summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2012-10-17 16:52:06 +0400
committerAndrew Dolgov <[email protected]>2012-10-17 16:52:06 +0400
commitf3d4e3e31c488e5ded0a457308c746913aecef8c (patch)
tree854fe72aca15243510688d36174b1de02fb6a1b3 /src
parentca4459d88fa75b988918c30a9d024a3534c7c1a2 (diff)
call onScaleListener from the correct place
Diffstat (limited to 'src')
-rw-r--r--src/it/sephiroth/android/library/imagezoom/ImageViewTouch.java15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/it/sephiroth/android/library/imagezoom/ImageViewTouch.java b/src/it/sephiroth/android/library/imagezoom/ImageViewTouch.java
index f958bb9..c189cf8 100644
--- a/src/it/sephiroth/android/library/imagezoom/ImageViewTouch.java
+++ b/src/it/sephiroth/android/library/imagezoom/ImageViewTouch.java
@@ -112,13 +112,6 @@ public class ImageViewTouch extends ImageViewTouchBase {
}
break;
}
- if (mScaleChangedListener != null) {
- RectF bitmapRect = getBitmapRect();
-
- boolean widthFits = getWidth() >= (bitmapRect.right - bitmapRect.left);
-
- mScaleChangedListener.onScaleChanged(mCurrentScaleFactor, widthFits);
- }
return true;
}
@@ -126,6 +119,14 @@ public class ImageViewTouch extends ImageViewTouchBase {
protected void onZoom( float scale ) {
super.onZoom( scale );
if ( !mScaleDetector.isInProgress() ) mCurrentScaleFactor = scale;
+
+ if (mScaleChangedListener != null) {
+ RectF bitmapRect = getBitmapRect();
+
+ boolean widthFits = getWidth() >= (bitmapRect.right - bitmapRect.left);
+
+ mScaleChangedListener.onScaleChanged(mCurrentScaleFactor, widthFits);
+ }
}
protected float onDoubleTapPost( float scale, float maxZoom ) {