From 7be0e2b8439d525c70cb062c6616d10c4fc004aa Mon Sep 17 00:00:00 2001 From: ztenghui Date: Tue, 15 Oct 2013 14:13:26 -0700 Subject: Don't allow swipe into the film strip view when swipe is disabled The swipe is supposed to be intercepted by FilmStripView, however, when the children is not handling the scroll / fling gestures, FilmStripView will still has to handle it. In this case, we need to detect whether or not the swipe has been disabled. bug:11234333 bug:11221594 Change-Id: I1d0fbac65050aef225fb880a41df735e98bf48db --- src/com/android/camera/ui/FilmStripView.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/com/android/camera/ui/FilmStripView.java') diff --git a/src/com/android/camera/ui/FilmStripView.java b/src/com/android/camera/ui/FilmStripView.java index f41f08114..acaf93207 100644 --- a/src/com/android/camera/ui/FilmStripView.java +++ b/src/com/android/camera/ui/FilmStripView.java @@ -2611,7 +2611,11 @@ public class FilmStripView extends ViewGroup implements BottomControlsListener { @Override public boolean onScroll(float x, float y, float dx, float dy) { - if (mViewItem[mCurrentItem] == null) { + ViewItem currItem = mViewItem[mCurrentItem]; + if (currItem == null) { + return false; + } + if (!mDataAdapter.canSwipeInFullScreen(currItem.getId())) { return false; } // When image is zoomed in to be bigger than the screen @@ -2676,6 +2680,9 @@ public class FilmStripView extends ViewGroup implements BottomControlsListener { if (currItem == null) { return false; } + if (!mDataAdapter.canSwipeInFullScreen(currItem.getId())) { + return false; + } if (mController.isZoomStarted()) { // Fling within the zoomed image mController.flingInsideZoomView(velocityX, velocityY); -- cgit v1.2.3