summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/touch
diff options
context:
space:
mode:
authorTony <twickham@google.com>2019-03-27 14:09:55 -0500
committerTony <twickham@google.com>2019-04-01 15:48:51 -0500
commite243a9493e3e615cba7036933b2f740db9f8aed6 (patch)
tree013fc9e4415bbbfab7ef7d58d6695c6984cd0d9c /src/com/android/launcher3/touch
parent1ac6c84bda2d03c8b28207287246dc83a7291d81 (diff)
downloadandroid_packages_apps_Trebuchet-e243a9493e3e615cba7036933b2f740db9f8aed6.tar.gz
android_packages_apps_Trebuchet-e243a9493e3e615cba7036933b2f740db9f8aed6.tar.bz2
android_packages_apps_Trebuchet-e243a9493e3e615cba7036933b2f740db9f8aed6.zip
Swipe up from nav bar in OVERVIEW or ALL_APPS to go home
Add NavBarToHomeTouchController, which intercepts touches from the nav bar region when in overview or all apps. Swiping up from all apps translates it up and slightly fades out app icons, then letting go springs towards home screen. Swiping up from overview translates it to the right, then letting go springs towards the left where it lives in the home state. Both cases have a strong deceleration while swiping. Bug: 129571305 Bug: 111926330 Change-Id: I5b7de05f15f0300233343fa2d69fcad624e070f8
Diffstat (limited to 'src/com/android/launcher3/touch')
-rw-r--r--src/com/android/launcher3/touch/AbstractStateChangeTouchController.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/com/android/launcher3/touch/AbstractStateChangeTouchController.java b/src/com/android/launcher3/touch/AbstractStateChangeTouchController.java
index c403e76ee..0274de35c 100644
--- a/src/com/android/launcher3/touch/AbstractStateChangeTouchController.java
+++ b/src/com/android/launcher3/touch/AbstractStateChangeTouchController.java
@@ -224,7 +224,8 @@ public abstract class AbstractStateChangeTouchController
return true;
}
- private boolean goingBetweenNormalAndOverview(LauncherState fromState, LauncherState toState) {
+ protected boolean goingBetweenNormalAndOverview(LauncherState fromState,
+ LauncherState toState) {
return (fromState == NORMAL || fromState == OVERVIEW)
&& (toState == NORMAL || toState == OVERVIEW)
&& mPendingAnimation == null;
@@ -242,7 +243,7 @@ public abstract class AbstractStateChangeTouchController
mStartContainerType = LauncherLogProto.ContainerType.ALLAPPS;
} else if (mStartState == NORMAL) {
mStartContainerType = getLogContainerTypeForNormalState();
- } else if (mStartState == OVERVIEW){
+ } else if (mStartState == OVERVIEW){
mStartContainerType = LauncherLogProto.ContainerType.TASKSWITCHER;
}
if (mCurrentAnimation == null) {