diff options
Diffstat (limited to 'src_ui_overrides/com/android/launcher3/uioverrides')
-rw-r--r-- | src_ui_overrides/com/android/launcher3/uioverrides/AllAppsSwipeController.java | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src_ui_overrides/com/android/launcher3/uioverrides/AllAppsSwipeController.java b/src_ui_overrides/com/android/launcher3/uioverrides/AllAppsSwipeController.java index e495477f5..c97c3ccec 100644 --- a/src_ui_overrides/com/android/launcher3/uioverrides/AllAppsSwipeController.java +++ b/src_ui_overrides/com/android/launcher3/uioverrides/AllAppsSwipeController.java @@ -7,6 +7,7 @@ import android.view.MotionEvent; import com.android.launcher3.AbstractFloatingView; import com.android.launcher3.Launcher; +import com.android.launcher3.LauncherState; import com.android.launcher3.touch.AbstractStateChangeTouchController; import com.android.launcher3.touch.SwipeDetector; import com.android.launcher3.userevent.nano.LauncherLogProto.ContainerType; @@ -43,12 +44,8 @@ public class AllAppsSwipeController extends AbstractStateChangeTouchController { protected int getSwipeDirection(MotionEvent ev) { if (mLauncher.isInState(ALL_APPS)) { mStartContainerType = ContainerType.ALLAPPS; - mFromState = ALL_APPS; - mToState = NORMAL; return SwipeDetector.DIRECTION_NEGATIVE; } else { - mFromState = NORMAL; - mToState = ALL_APPS; mStartContainerType = mLauncher.getDragLayer().isEventOverHotseat(ev) ? ContainerType.HOTSEAT : ContainerType.WORKSPACE; return SwipeDetector.DIRECTION_POSITIVE; @@ -56,6 +53,11 @@ public class AllAppsSwipeController extends AbstractStateChangeTouchController { } @Override + protected LauncherState getTargetState(LauncherState fromState, boolean isDragTowardPositive) { + return fromState == ALL_APPS ? NORMAL : ALL_APPS; + } + + @Override protected float initCurrentAnimation() { float range = getShiftRange(); long maxAccuracy = (long) (2 * range); |