summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/widget
diff options
context:
space:
mode:
authorPaul Rohde <codelogic@google.com>2015-02-19 11:26:01 -0800
committerPaul Rohde <codelogic@google.com>2015-02-19 11:30:24 -0800
commitb6a8810b7a5ac0df1e19efd26628c01bcb32b97b (patch)
treec6a5516857f688433d7e066d9f8d48da376fbe87 /src/com/android/camera/widget
parent90b584400dc5d7535de84f6a2601e3d3e6825764 (diff)
downloadandroid_packages_apps_Camera2-b6a8810b7a5ac0df1e19efd26628c01bcb32b97b.tar.gz
android_packages_apps_Camera2-b6a8810b7a5ac0df1e19efd26628c01bcb32b97b.tar.bz2
android_packages_apps_Camera2-b6a8810b7a5ac0df1e19efd26628c01bcb32b97b.zip
Remove CanSwipeInFullScreen attribute.
This fixes the swipe guesture problem by removing the mostly unused canSwipeInFullScreen attribute on filmstrip items and checking existing usages to ensure they still work. Bug: 18948437 Change-Id: I7d8c9fba4b0cf3db6fc3d60afe37d527c0732318
Diffstat (limited to 'src/com/android/camera/widget')
-rw-r--r--src/com/android/camera/widget/FilmstripView.java17
1 files changed, 5 insertions, 12 deletions
diff --git a/src/com/android/camera/widget/FilmstripView.java b/src/com/android/camera/widget/FilmstripView.java
index 05b8e6407..905f60246 100644
--- a/src/com/android/camera/widget/FilmstripView.java
+++ b/src/com/android/camera/widget/FilmstripView.java
@@ -1673,12 +1673,6 @@ public class FilmstripView extends ViewGroup {
if (ev.getActionMasked() == MotionEvent.ACTION_DOWN) {
mCheckToIntercept = true;
mDown = MotionEvent.obtain(ev);
- ViewItem viewItem = mViewItems[BUFFER_CENTER];
- // Do not intercept touch if swipe is not enabled
- if (viewItem != null &&
- !mDataAdapter.canSwipeInFullScreen(viewItem.getAdapterIndex())) {
- mCheckToIntercept = false;
- }
return false;
} else if (ev.getActionMasked() == MotionEvent.ACTION_POINTER_DOWN) {
// Do not intercept touch once child is in zoom mode
@@ -2256,6 +2250,7 @@ public class FilmstripView extends ViewGroup {
// Estimation of possible length on the right. Likewise, exaggerate
// the possible maximum too.
int maxX = estimateMaxX(item.getAdapterIndex(), item.getLeftPosition(), w);
+
mScrollGesture.fling(mCenterX, 0, (int) -velocityX, 0, minX, maxX, 0, 0);
}
@@ -2354,6 +2349,7 @@ public class FilmstripView extends ViewGroup {
} else if (!mCanStopScroll && !forced) {
return false;
}
+
mScrollGesture.forceFinished(true);
return true;
}
@@ -2834,9 +2830,7 @@ public class FilmstripView extends ViewGroup {
if (currItem == null) {
return false;
}
- if (inFullScreen() && !mDataAdapter.canSwipeInFullScreen(currItem.getAdapterIndex())) {
- return false;
- }
+
hideZoomView();
// When image is zoomed in to be bigger than the screen
if (inZoomView()) {
@@ -2944,9 +2938,7 @@ public class FilmstripView extends ViewGroup {
if (currItem == null) {
return false;
}
- if (!mDataAdapter.canSwipeInFullScreen(currItem.getAdapterIndex())) {
- return false;
- }
+
if (inZoomView()) {
// Fling within the zoomed image
mController.flingInsideZoomView(velocityX, velocityY);
@@ -2998,6 +2990,7 @@ public class FilmstripView extends ViewGroup {
}
}
+
if (mScale == FILM_STRIP_SCALE) {
mController.fling(velocityX);
}