diff options
Diffstat (limited to 'src/com')
| -rw-r--r-- | src/com/android/gallery3d/ui/PhotoView.java | 2 | ||||
| -rw-r--r-- | src/com/android/gallery3d/ui/PositionController.java | 9 |
2 files changed, 8 insertions, 3 deletions
diff --git a/src/com/android/gallery3d/ui/PhotoView.java b/src/com/android/gallery3d/ui/PhotoView.java index 568dcf240..2d6b57285 100644 --- a/src/com/android/gallery3d/ui/PhotoView.java +++ b/src/com/android/gallery3d/ui/PhotoView.java @@ -1203,7 +1203,7 @@ public class PhotoView extends GLView { // animation. if (mModel.getCurrentIndex() > SCREEN_NAIL_MAX) { switchToFirstImage(); - mPositionController.skipAnimation(); + mPositionController.skipToFinalPosition(); return true; } diff --git a/src/com/android/gallery3d/ui/PositionController.java b/src/com/android/gallery3d/ui/PositionController.java index cf41d3a30..ae0df34b5 100644 --- a/src/com/android/gallery3d/ui/PositionController.java +++ b/src/com/android/gallery3d/ui/PositionController.java @@ -213,8 +213,7 @@ class PositionController { // If we have the opening animation, do it. Otherwise go directly to the // right position. if (!startOpeningAnimationIfNeeded()) { - snapAndRedraw(); - skipAnimation(); + skipToFinalPosition(); } } @@ -421,6 +420,12 @@ class PositionController { snapAndRedraw(); } + public void skipToFinalPosition() { + stopAnimation(); + snapAndRedraw(); + skipAnimation(); + } + //////////////////////////////////////////////////////////////////////////// // Start an animations for the focused box //////////////////////////////////////////////////////////////////////////// |
