mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-04 18:06:48 +00:00
Update interpolators and durations for state animations
When we enter overview (overview appears, workspace disappears): - Workspace scales down from 1f to .8f with OvershootInterpolator(1.2f) at 200 ms - Workspace fades from 1f to 0 with OvershootInterpolator(1.2f) at 200 ms - Overview scales down from 1.33f to 1f with OvershootInterpolator(1.2f) at 200 ms - Overview fades from 0 to 1f with OvershootInterpolator(1.2f) at 200 ms When we exit overview (overview disappears, workspace appears): - Workspace scales up from .92f to .1f with DecelerateInterpolator() at 200 ms - Workspace fades from 0 to 1f with AccelerateInterpolator() at 200 ms - Overview scales up from 1f to 1.1f with AccelerateInterpolator() at 180ms - Overview fades from 1f to 0 with DecelerateInterpolator(1.7f) at 200 ms Parallax while the finger moves: Workspace translates half the distance as the shelf Bug: 79776746 Change-Id: I319d982cf202bcd6dbbcd68ffc5c0c7853629c7e
This commit is contained in:
@@ -15,6 +15,10 @@
|
||||
*/
|
||||
package com.android.launcher3.uioverrides;
|
||||
|
||||
import static com.android.launcher3.LauncherState.FAST_OVERVIEW;
|
||||
import static com.android.launcher3.LauncherState.OVERVIEW;
|
||||
import static com.android.launcher3.anim.AnimatorSetBuilder.ANIM_OVERVIEW_FADE;
|
||||
import static com.android.launcher3.anim.AnimatorSetBuilder.ANIM_OVERVIEW_SCALE;
|
||||
import static com.android.launcher3.anim.Interpolators.AGGRESSIVE_EASE_IN_OUT;
|
||||
import static com.android.launcher3.anim.Interpolators.LINEAR;
|
||||
import static com.android.quickstep.QuickScrubController.QUICK_SCRUB_START_INTERPOLATOR;
|
||||
@@ -72,16 +76,17 @@ public class RecentsViewStateController implements StateHandler {
|
||||
}
|
||||
PropertySetter setter = config.getPropertySetter(builder);
|
||||
float[] scaleTranslationYFactor = toState.getOverviewScaleAndTranslationYFactor(mLauncher);
|
||||
setter.setFloat(mRecentsView, ADJACENT_SCALE, scaleTranslationYFactor[0], LINEAR);
|
||||
Interpolator transYInterpolator = LINEAR;
|
||||
if (toState == LauncherState.FAST_OVERVIEW) {
|
||||
Interpolator scaleInterpolator = builder.getInterpolator(ANIM_OVERVIEW_SCALE, LINEAR);
|
||||
setter.setFloat(mRecentsView, ADJACENT_SCALE, scaleTranslationYFactor[0], scaleInterpolator);
|
||||
Interpolator transYInterpolator = scaleInterpolator;
|
||||
if (mLauncher.getStateManager().getState() == OVERVIEW && toState == FAST_OVERVIEW) {
|
||||
transYInterpolator = Interpolators.clampToProgress(QUICK_SCRUB_START_INTERPOLATOR, 0,
|
||||
QUICK_SCRUB_TRANSLATION_Y_FACTOR);
|
||||
}
|
||||
setter.setFloat(mRecentsView, TRANSLATION_Y_FACTOR, scaleTranslationYFactor[1],
|
||||
transYInterpolator);
|
||||
setter.setFloat(mRecentsViewContainer, CONTENT_ALPHA, toState.overviewUi ? 1 : 0,
|
||||
AGGRESSIVE_EASE_IN_OUT);
|
||||
builder.getInterpolator(ANIM_OVERVIEW_FADE, AGGRESSIVE_EASE_IN_OUT));
|
||||
|
||||
if (!toState.overviewUi) {
|
||||
builder.addOnFinishRunnable(mRecentsView::resetTaskVisuals);
|
||||
|
||||
Reference in New Issue
Block a user