summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/allapps/AllAppsTransitionController.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/launcher3/allapps/AllAppsTransitionController.java')
-rw-r--r--src/com/android/launcher3/allapps/AllAppsTransitionController.java13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/com/android/launcher3/allapps/AllAppsTransitionController.java b/src/com/android/launcher3/allapps/AllAppsTransitionController.java
index ecb972496..a6194cc20 100644
--- a/src/com/android/launcher3/allapps/AllAppsTransitionController.java
+++ b/src/com/android/launcher3/allapps/AllAppsTransitionController.java
@@ -107,8 +107,7 @@ public class AllAppsTransitionController implements TouchController, SwipeDetect
public AllAppsTransitionController(Launcher l) {
mLauncher = l;
- mDetector = new SwipeDetector(l);
- mDetector.setListener(this);
+ mDetector = new SwipeDetector(l, this, SwipeDetector.VERTICAL);
mShiftRange = DEFAULT_SHIFT_RANGE;
mProgress = 1f;
@@ -137,15 +136,15 @@ public class AllAppsTransitionController implements TouchController, SwipeDetect
if (mDetector.isIdleState()) {
if (mLauncher.isAllAppsVisible()) {
- directionsToDetectScroll |= SwipeDetector.DIRECTION_DOWN;
+ directionsToDetectScroll |= SwipeDetector.DIRECTION_NEGATIVE;
} else {
- directionsToDetectScroll |= SwipeDetector.DIRECTION_UP;
+ directionsToDetectScroll |= SwipeDetector.DIRECTION_POSITIVE;
}
} else {
if (isInDisallowRecatchBottomZone()) {
- directionsToDetectScroll |= SwipeDetector.DIRECTION_UP;
+ directionsToDetectScroll |= SwipeDetector.DIRECTION_POSITIVE;
} else if (isInDisallowRecatchTopZone()) {
- directionsToDetectScroll |= SwipeDetector.DIRECTION_DOWN;
+ directionsToDetectScroll |= SwipeDetector.DIRECTION_NEGATIVE;
} else {
directionsToDetectScroll |= SwipeDetector.DIRECTION_BOTH;
ignoreSlopWhenSettling = true;
@@ -368,7 +367,7 @@ public class AllAppsTransitionController implements TouchController, SwipeDetect
}
private void calculateDuration(float velocity, float disp) {
- mAnimationDuration = mDetector.calculateDuration(velocity, disp / mShiftRange);
+ mAnimationDuration = SwipeDetector.calculateDuration(velocity, disp / mShiftRange);
}
public boolean animateToAllApps(AnimatorSet animationOut, long duration) {