diff options
author | Sunny Goyal <sunnygoyal@google.com> | 2018-01-12 14:17:30 -0800 |
---|---|---|
committer | Sunny Goyal <sunnygoyal@google.com> | 2018-01-16 10:31:36 -0800 |
commit | 05a3bbdef8c328370a51e045db12d67e62956b3f (patch) | |
tree | 4f2c04f988d272f2de022f959e5c4fad4970a2d7 /src/com/android/launcher3/touch/SwipeDetector.java | |
parent | 9f082604b0b2e9bc5fe857e418739252e7f3e81d (diff) | |
download | packages_apps_Trebuchet-05a3bbdef8c328370a51e045db12d67e62956b3f.tar.gz packages_apps_Trebuchet-05a3bbdef8c328370a51e045db12d67e62956b3f.tar.bz2 packages_apps_Trebuchet-05a3bbdef8c328370a51e045db12d67e62956b3f.zip |
Adding swipe gestures in overview screen
> When on home time, swiping up goes to all_apps, and swiping down goes to normal
> When on a recents tile, swiping up the tile dismisses it, swiping down launches it
> When on a recents tile, swiping up on the hotseat opens allApps.
Change-Id: I59f8c02f5c5d9cb88c0585a083fbc33d33b1c806
Diffstat (limited to 'src/com/android/launcher3/touch/SwipeDetector.java')
-rw-r--r-- | src/com/android/launcher3/touch/SwipeDetector.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/com/android/launcher3/touch/SwipeDetector.java b/src/com/android/launcher3/touch/SwipeDetector.java index ff5f64cd9..df348854c 100644 --- a/src/com/android/launcher3/touch/SwipeDetector.java +++ b/src/com/android/launcher3/touch/SwipeDetector.java @@ -286,6 +286,16 @@ public class SwipeDetector { } } + /** + * Returns if the start drag was towards the positive direction or negative. + * + * @see #setDetectableScrollConditions(int, boolean) + * @see #DIRECTION_BOTH + */ + public boolean wasInitialTouchPositive() { + return mSubtractDisplacement < 0; + } + private boolean reportDragging() { if (mDisplacement != mLastDisplacement) { if (DBG) { |