Loading src/com/android/gallery3d/app/PhotoDataAdapter.java +5 −0 Original line number Diff line number Diff line Loading @@ -339,6 +339,11 @@ public class PhotoDataAdapter implements PhotoPage.Model { updateCurrentIndex(mCurrentIndex - 1); } @Override public void moveToFirst() { updateCurrentIndex(0); } @Override public ScreenNail getScreenNail(int offset) { return getImage(mCurrentIndex + offset); Loading src/com/android/gallery3d/app/PhotoPage.java +2 −1 Original line number Diff line number Diff line Loading @@ -403,7 +403,8 @@ public class PhotoPage extends ActivityState protected void onBackPressed() { if (mShowDetails) { hideDetails(); } else if (!switchWithCaptureAnimation(-1)) { } else if (mScreenNail == null || !switchWithCaptureAnimation(-1)) { super.onBackPressed(); } } Loading src/com/android/gallery3d/app/SinglePhotoDataAdapter.java +5 −0 Original line number Diff line number Diff line Loading @@ -163,6 +163,11 @@ public class SinglePhotoDataAdapter extends TileImageViewAdapter throw new UnsupportedOperationException(); } @Override public void moveToFirst() { throw new UnsupportedOperationException(); } @Override public void getImageSize(int offset, PhotoView.Size size) { if (offset == 0) { Loading src/com/android/gallery3d/ui/PhotoView.java +6 −2 Original line number Diff line number Diff line Loading @@ -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. Loading Loading @@ -935,6 +936,10 @@ public class PhotoView extends GLView { mModel.previous(); } private void switchToFirstImage() { mModel.moveToFirst(); } //////////////////////////////////////////////////////////////////////////// // Opening Animation //////////////////////////////////////////////////////////////////////////// Loading @@ -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; Loading @@ -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; Loading Loading
src/com/android/gallery3d/app/PhotoDataAdapter.java +5 −0 Original line number Diff line number Diff line Loading @@ -339,6 +339,11 @@ public class PhotoDataAdapter implements PhotoPage.Model { updateCurrentIndex(mCurrentIndex - 1); } @Override public void moveToFirst() { updateCurrentIndex(0); } @Override public ScreenNail getScreenNail(int offset) { return getImage(mCurrentIndex + offset); Loading
src/com/android/gallery3d/app/PhotoPage.java +2 −1 Original line number Diff line number Diff line Loading @@ -403,7 +403,8 @@ public class PhotoPage extends ActivityState protected void onBackPressed() { if (mShowDetails) { hideDetails(); } else if (!switchWithCaptureAnimation(-1)) { } else if (mScreenNail == null || !switchWithCaptureAnimation(-1)) { super.onBackPressed(); } } Loading
src/com/android/gallery3d/app/SinglePhotoDataAdapter.java +5 −0 Original line number Diff line number Diff line Loading @@ -163,6 +163,11 @@ public class SinglePhotoDataAdapter extends TileImageViewAdapter throw new UnsupportedOperationException(); } @Override public void moveToFirst() { throw new UnsupportedOperationException(); } @Override public void getImageSize(int offset, PhotoView.Size size) { if (offset == 0) { Loading
src/com/android/gallery3d/ui/PhotoView.java +6 −2 Original line number Diff line number Diff line Loading @@ -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. Loading Loading @@ -935,6 +936,10 @@ public class PhotoView extends GLView { mModel.previous(); } private void switchToFirstImage() { mModel.moveToFirst(); } //////////////////////////////////////////////////////////////////////////// // Opening Animation //////////////////////////////////////////////////////////////////////////// Loading @@ -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; Loading @@ -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; Loading