diff options
author | Doris Liu <tianliu@google.com> | 2013-11-04 14:03:28 -0800 |
---|---|---|
committer | Doris Liu <tianliu@google.com> | 2013-11-04 14:09:35 -0800 |
commit | b0288ec84e06b83923180a04e1b546724fcfd258 (patch) | |
tree | 46ef23c67c0239e28159db10e19f709aca08ff86 /src/com/android/camera/ui/FilmStripView.java | |
parent | ba1b30b7793a8a881493a9fc48f27d503db2405b (diff) | |
download | android_packages_apps_Snap-b0288ec84e06b83923180a04e1b546724fcfd258.tar.gz android_packages_apps_Snap-b0288ec84e06b83923180a04e1b546724fcfd258.tar.bz2 android_packages_apps_Snap-b0288ec84e06b83923180a04e1b546724fcfd258.zip |
Preserve high resolution image on touch during zoom
Bug: 11477449
Change-Id: I08b33cee258de1f90e5fa60e6483834dd5197bd2
Diffstat (limited to 'src/com/android/camera/ui/FilmStripView.java')
-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 |