diff options
author | Chih-Chung Chang <chihchung@google.com> | 2012-05-30 16:29:18 -0700 |
---|---|---|
committer | Chih-Chung Chang <chihchung@google.com> | 2012-05-30 16:47:06 -0700 |
commit | d416516856065b7b652b71700853b02d93376327 (patch) | |
tree | 27667677931ef2733b815d7ec5bf523c4e51b2ea /src | |
parent | 7507d23f7fb8b9a42a9e01d8af5762a94ccbab85 (diff) | |
download | android_packages_apps_Snap-d416516856065b7b652b71700853b02d93376327.tar.gz android_packages_apps_Snap-d416516856065b7b652b71700853b02d93376327.tar.bz2 android_packages_apps_Snap-d416516856065b7b652b71700853b02d93376327.zip |
Move to final position after view size change.
Bug: 6584188
Change-Id: If6ab23532bd7040701e358f9cdd813d2f6a71e5c
Diffstat (limited to 'src')
-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 //////////////////////////////////////////////////////////////////////////// |