summaryrefslogtreecommitdiffstats
path: root/src_ui_overrides
diff options
context:
space:
mode:
authorTony Wickham <twickham@google.com>2018-04-19 11:39:34 -0700
committerTony Wickham <twickham@google.com>2018-05-09 12:33:46 -0700
commit6becf7c07d4714369d40dcd575a99855894c0f8a (patch)
tree3c00366778c8ff372719ec58769648e4bb0a3a36 /src_ui_overrides
parent639b07178f6412cd931818c7787c5f6effd42317 (diff)
downloadandroid_packages_apps_Trebuchet-6becf7c07d4714369d40dcd575a99855894c0f8a.tar.gz
android_packages_apps_Trebuchet-6becf7c07d4714369d40dcd575a99855894c0f8a.tar.bz2
android_packages_apps_Trebuchet-6becf7c07d4714369d40dcd575a99855894c0f8a.zip
Add atomic recents animation while swiping up
State handlers can now specify atomic and non-atomic components of their animations to states, which can be specified when creating a new animation. There is now one atomic animation, when going from NORMAL to OVERVIEW (and in reverse): - RecentsViewStateController's animation (scale/alpha) is all atomic - WorkspaceStateTransitionAnimation has atomic and non-atomic: - Hotseat and workspace alpha is atomic, as is workspace scale - Everything else (scrim, translation, qsb and drag handle alpha) is non-atomic - All apps progress is non-atomic Also simplified dragging through overview; no longer pulls against you, so we use an OvershootInterpolator when flinging instead of our custom interpolator for the spring effect. Bug: 76449024 Bug: 78089840 Change-Id: Iafac84d0c2b99ee9cf9dd5b30e2218286713b449
Diffstat (limited to 'src_ui_overrides')
-rw-r--r--src_ui_overrides/com/android/launcher3/uioverrides/AllAppsSwipeController.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src_ui_overrides/com/android/launcher3/uioverrides/AllAppsSwipeController.java b/src_ui_overrides/com/android/launcher3/uioverrides/AllAppsSwipeController.java
index 860be5ff7..80c2485fe 100644
--- a/src_ui_overrides/com/android/launcher3/uioverrides/AllAppsSwipeController.java
+++ b/src_ui_overrides/com/android/launcher3/uioverrides/AllAppsSwipeController.java
@@ -8,6 +8,7 @@ import android.view.MotionEvent;
import com.android.launcher3.AbstractFloatingView;
import com.android.launcher3.Launcher;
import com.android.launcher3.LauncherState;
+import com.android.launcher3.LauncherStateManager.AnimationComponents;
import com.android.launcher3.touch.AbstractStateChangeTouchController;
import com.android.launcher3.touch.SwipeDetector;
import com.android.launcher3.userevent.nano.LauncherLogProto.ContainerType;
@@ -62,11 +63,11 @@ public class AllAppsSwipeController extends AbstractStateChangeTouchController {
}
@Override
- protected float initCurrentAnimation() {
+ protected float initCurrentAnimation(@AnimationComponents int animComponents) {
float range = getShiftRange();
long maxAccuracy = (long) (2 * range);
mCurrentAnimation = mLauncher.getStateManager()
- .createAnimationToNewWorkspace(mToState, maxAccuracy);
+ .createAnimationToNewWorkspace(mToState, maxAccuracy, animComponents);
float startVerticalShift = mFromState.getVerticalProgress(mLauncher) * range;
float endVerticalShift = mToState.getVerticalProgress(mLauncher) * range;
float totalShift = endVerticalShift - startVerticalShift;