diff options
author | Chih-Chung Chang <chihchung@google.com> | 2012-04-25 11:50:08 +0800 |
---|---|---|
committer | Chih-Chung Chang <chihchung@google.com> | 2012-04-25 12:03:03 +0800 |
commit | 9e65a3ae634f0e5b6fccaa929b54b884be0380e4 (patch) | |
tree | 1e2da2e84a5a2a4520d983cd694332574004c6df /src/com/android/gallery3d/ui/PhotoView.java | |
parent | 210934990196deeea0d19a148e85b3c1c136eb40 (diff) | |
download | android_packages_apps_Snap-9e65a3ae634f0e5b6fccaa929b54b884be0380e4.tar.gz android_packages_apps_Snap-9e65a3ae634f0e5b6fccaa929b54b884be0380e4.tar.bz2 android_packages_apps_Snap-9e65a3ae634f0e5b6fccaa929b54b884be0380e4.zip |
Don't do capture animation if we don't have Camera ScreenNail.
Also make "Back" jump to first picture instead of the previous one.
Bug: 6388263
Change-Id: Idf78363cf3952bf66c6b0688e79d99c01956cd07
Diffstat (limited to 'src/com/android/gallery3d/ui/PhotoView.java')
-rw-r--r-- | src/com/android/gallery3d/ui/PhotoView.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/com/android/gallery3d/ui/PhotoView.java b/src/com/android/gallery3d/ui/PhotoView.java index 66941bee6..5487e3ecb 100644 --- a/src/com/android/gallery3d/ui/PhotoView.java +++ b/src/com/android/gallery3d/ui/PhotoView.java @@ -52,6 +52,7 @@ public class PhotoView extends GLView { public interface Model extends TileImageView.Model { public void next(); public void previous(); + public void moveToFirst(); // Returns the size for the specified picture. If the size information is // not avaiable, width = height = 0. @@ -935,6 +936,10 @@ public class PhotoView extends GLView { mModel.previous(); } + private void switchToFirstImage() { + mModel.moveToFirst(); + } + //////////////////////////////////////////////////////////////////////////// // Opening Animation //////////////////////////////////////////////////////////////////////////// @@ -958,7 +963,6 @@ public class PhotoView extends GLView { } private boolean switchWithCaptureAnimationLocked(int offset) { - if (mFilmMode) return false; if (mHolding != 0) return true; if (offset == 1) { if (mNextBound <= 0) return false; @@ -966,7 +970,7 @@ public class PhotoView extends GLView { mPositionController.startCaptureAnimationSlide(-1); } else if (offset == -1) { if (mPrevBound >= 0) return false; - switchToPrevImage(); + switchToFirstImage(); mPositionController.startCaptureAnimationSlide(1); } else { return false; |