summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/ui/FilmStripView.java
diff options
context:
space:
mode:
authorztenghui <ztenghui@google.com>2013-10-15 14:13:26 -0700
committerztenghui <ztenghui@google.com>2013-10-15 14:23:28 -0700
commit7be0e2b8439d525c70cb062c6616d10c4fc004aa (patch)
tree7f17c2767195ecb14ff2a238266e3a59219693df /src/com/android/camera/ui/FilmStripView.java
parentef01a315078587883d3c800d31df6af302b702a9 (diff)
downloadandroid_packages_apps_Snap-7be0e2b8439d525c70cb062c6616d10c4fc004aa.tar.gz
android_packages_apps_Snap-7be0e2b8439d525c70cb062c6616d10c4fc004aa.tar.bz2
android_packages_apps_Snap-7be0e2b8439d525c70cb062c6616d10c4fc004aa.zip
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
Diffstat (limited to 'src/com/android/camera/ui/FilmStripView.java')
-rw-r--r--src/com/android/camera/ui/FilmStripView.java9
1 files changed, 8 insertions, 1 deletions
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);