From 9e65a3ae634f0e5b6fccaa929b54b884be0380e4 Mon Sep 17 00:00:00 2001 From: Chih-Chung Chang Date: Wed, 25 Apr 2012 11:50:08 +0800 Subject: 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 --- src/com/android/gallery3d/ui/PhotoView.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/com/android/gallery3d/ui/PhotoView.java') 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; -- cgit v1.2.3