summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/PagedView.java
diff options
context:
space:
mode:
authorTony Wickham <twickham@google.com>2016-02-24 11:07:00 -0800
committerTony Wickham <twickham@google.com>2016-03-04 16:52:54 -0800
commitdadb304b4682998c43b9c07bef45b9a9380f3287 (patch)
tree57fcadbe3ee6a1f0d7b656cbb51bfc400b9554a3 /src/com/android/launcher3/PagedView.java
parentcd50a0fade590098b4322140c5fede04c6e7eb8e (diff)
downloadandroid_packages_apps_Trebuchet-dadb304b4682998c43b9c07bef45b9a9380f3287.tar.gz
android_packages_apps_Trebuchet-dadb304b4682998c43b9c07bef45b9a9380f3287.tar.bz2
android_packages_apps_Trebuchet-dadb304b4682998c43b9c07bef45b9a9380f3287.zip
Pinch to zoom out into overview mode.
There are 3 classes coordinating the gesture: PinchToOverviewListener, PinchThresholdManager, and PinchAnimationManager. - PTOL listens for the pinch gesture on DragLayer. - When a pinch is detected, the PTOL keeps track of the interpolated progress and passes it along to both the PTM and PAM. - The PTM uses the progress to determine whether a new threshold has been passed, and tells the PAM to animate it if so. - The PAM uses the progress to animate things like workspace scale throughout the pinch. - If the pinch ends early, the PTOL uses the last passed threshold to determine whether to animate to workspace or overview, and tells PAM to perform the animation at the same velocity as the pinch. Bug: 24414635 Change-Id: I9e53706c705f8b2982409bf7c223d8d0e9618bf0
Diffstat (limited to 'src/com/android/launcher3/PagedView.java')
-rw-r--r--src/com/android/launcher3/PagedView.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/com/android/launcher3/PagedView.java b/src/com/android/launcher3/PagedView.java
index bc15338eb..fc8bb4507 100644
--- a/src/com/android/launcher3/PagedView.java
+++ b/src/com/android/launcher3/PagedView.java
@@ -1445,6 +1445,8 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc
mLastMotionXRemainder = 0;
onScrollInteractionBegin();
pageBeginMoving();
+ // Stop listening for things like pinches.
+ requestDisallowInterceptTouchEvent(true);
}
}