diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/it/sephiroth/android/library/imagezoom/ImageViewTouch.java | 15 |
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 ) { |