diff options
author | Doris Liu <tianliu@google.com> | 2013-11-04 22:22:44 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2013-11-04 22:22:44 +0000 |
commit | 3493ba2a0a2e91a093c5fddad60bc1f1e56b91b5 (patch) | |
tree | 3b79cda09a5d21e2cedd79e7820119ed0fb8b79e | |
parent | 7f044e2eb182f1d1ae023d55f30757439a17ee09 (diff) | |
parent | b0288ec84e06b83923180a04e1b546724fcfd258 (diff) | |
download | android_packages_apps_Snap-3493ba2a0a2e91a093c5fddad60bc1f1e56b91b5.tar.gz android_packages_apps_Snap-3493ba2a0a2e91a093c5fddad60bc1f1e56b91b5.tar.bz2 android_packages_apps_Snap-3493ba2a0a2e91a093c5fddad60bc1f1e56b91b5.zip |
Merge "Preserve high resolution image on touch during zoom" into gb-ub-photos-carlsbad
-rw-r--r-- | src/com/android/camera/ui/FilmStripView.java | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/com/android/camera/ui/FilmStripView.java b/src/com/android/camera/ui/FilmStripView.java index c95f07c35..f6f1b6c62 100644 --- a/src/com/android/camera/ui/FilmStripView.java +++ b/src/com/android/camera/ui/FilmStripView.java @@ -1451,6 +1451,13 @@ public class FilmStripView extends ViewGroup implements BottomControlsListener { mController.setSurroundingViewsVisible(true); } + private void hideZoomView() { + if (mController.isZoomStarted()) { + mController.cancelLoadingZoomedImage(); + mZoomView.setVisibility(GONE); + } + } + // Keeps the view in the view hierarchy if it's camera preview. // Remove from the hierarchy otherwise. private void checkForRemoval(ImageData data, View v) { @@ -2619,13 +2626,7 @@ public class FilmStripView extends ViewGroup implements BottomControlsListener { if (!mController.stopScrolling(false)) { return false; } - // A down event is usually followed by a gesture, we apply gesture on - // the lower-res image during a gesture to ensure a responsive experience. - // TODO: Delay this until gesture starts. - if (mController.isZoomStarted()) { - mController.cancelLoadingZoomedImage(); - mZoomView.setVisibility(GONE); - } + return true; } @@ -2713,9 +2714,9 @@ public class FilmStripView extends ViewGroup implements BottomControlsListener { if (!mDataAdapter.canSwipeInFullScreen(currItem.getId())) { return false; } + hideZoomView(); // When image is zoomed in to be bigger than the screen if (mController.isZoomStarted()) { - mController.cancelLoadingZoomedImage(); ViewItem curr = mViewItem[mCurrentItem]; float transX = curr.getTranslationX() - dx; float transY = curr.getTranslationY() - dy; @@ -2838,6 +2839,8 @@ public class FilmStripView extends ViewGroup implements BottomControlsListener { if (inCameraFullscreen()) { return false; } + + hideZoomView(); mScaleTrend = 1f; // If the image is smaller than screen size, we should allow to zoom // in to full screen size |