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 | 42e1fed4edd9ed1e326aab2f7969242c56812952 (patch) | |
tree | 0ba95c8cd01e39f5624ab8dde0d4d7263d429027 /src/com/android/gallery3d/ui | |
parent | 28b4d3a8fd7a70647f9445752bf1a4e73b99f265 (diff) | |
download | android_packages_apps_Gallery2-42e1fed4edd9ed1e326aab2f7969242c56812952.tar.gz android_packages_apps_Gallery2-42e1fed4edd9ed1e326aab2f7969242c56812952.tar.bz2 android_packages_apps_Gallery2-42e1fed4edd9ed1e326aab2f7969242c56812952.zip |
Move to final position after view size change.
Bug: 6584188
Change-Id: If6ab23532bd7040701e358f9cdd813d2f6a71e5c
Diffstat (limited to 'src/com/android/gallery3d/ui')
-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 //////////////////////////////////////////////////////////////////////////// |