summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDoris Liu <tianliu@google.com>2013-10-01 17:44:14 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-10-01 17:44:14 +0000
commite2d59dcccf177fdd158949a6b2f741a75d504416 (patch)
tree68d3dd01b1f9e9b5ae0ffd93ed42b077743f5578 /src
parentad3003bbb275b91d7564568e413400fc187dbcd4 (diff)
parent5326f0265206ccd8a2f3424bb983da674b20a31e (diff)
downloadandroid_packages_apps_Snap-e2d59dcccf177fdd158949a6b2f741a75d504416.tar.gz
android_packages_apps_Snap-e2d59dcccf177fdd158949a6b2f741a75d504416.tar.bz2
android_packages_apps_Snap-e2d59dcccf177fdd158949a6b2f741a75d504416.zip
Merge "Double tap to full screen from filmstrip" into gb-ub-photos-carlsbad
Diffstat (limited to 'src')
-rw-r--r--src/com/android/camera/ui/FilmStripView.java17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/com/android/camera/ui/FilmStripView.java b/src/com/android/camera/ui/FilmStripView.java
index fc1970441..75886df05 100644
--- a/src/com/android/camera/ui/FilmStripView.java
+++ b/src/com/android/camera/ui/FilmStripView.java
@@ -2250,10 +2250,13 @@ public class FilmStripView extends ViewGroup implements BottomControlsListener {
@Override
public boolean onDoubleTap(float x, float y) {
- if (mScale < FULL_SCREEN_SCALE || inCameraFullscreen()) {
+ ViewItem current = mViewItem[mCurrentItem];
+ if (inFilmStrip() && current != null) {
+ mController.goToFullScreen();
+ return true;
+ } else if (mScale < FULL_SCREEN_SCALE || inCameraFullscreen()) {
return false;
}
- ViewItem current = mViewItem[mCurrentItem];
if (current == null) {
return false;
}
@@ -2262,7 +2265,7 @@ public class FilmStripView extends ViewGroup implements BottomControlsListener {
}
mListener.setSystemDecorsVisibility(false);
mController.zoomAt(current, x, y);
- return false;
+ return true;
}
@Override
@@ -2324,8 +2327,9 @@ public class FilmStripView extends ViewGroup implements BottomControlsListener {
}
}
+ int currId = currItem.getId();
if (mCenterX > currItem.getCenterX() + CAMERA_PREVIEW_SWIPE_THRESHOLD
- && currItem.getId() == 0
+ && currId == 0
&& getCurrentViewType() == ImageData.VIEW_TYPE_STICKY
&& mDataIdOnUserScrolling == 0) {
mController.goToFilmStrip();
@@ -2338,15 +2342,16 @@ public class FilmStripView extends ViewGroup implements BottomControlsListener {
// No next photo.
snapInCenter();
}
- } if (mCenterX == currItem.getCenterX() && currItem.getId() == 0
+ } if (mCenterX == currItem.getCenterX() && currId == 0
&& getCurrentViewType() == ImageData.VIEW_TYPE_STICKY) {
mController.goToFullScreen();
} else {
- if (mDataIdOnUserScrolling == 0 && currItem.getId() != 0) {
+ if (mDataIdOnUserScrolling == 0 && currId != 0) {
// Special case to go to filmstrip when the user scroll away
// from the camera preview and the current one is not the
// preview anymore.
mController.goToFilmStrip();
+ mDataIdOnUserScrolling = currId;
}
snapInCenter();
}