mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-05 18:36:49 +00:00
Set new scrimMultiplier instead of scrimProgress for overview -> home
Animating this new property allows us to adjust the scrim without competing with other state animations that could be setting the scrim progress. Also reset scrimMultipler = 1 for state transitions. Test: Swipe from home to overview, then during that transition swipe from overview to home; when the former transition ends while the second is still in progress, ensure scrim value doesn't jump Bug: 144170434 Change-Id: I44b57ced1c6902e558fe1818bcbf11ceb4ff2f6f
This commit is contained in:
@@ -18,6 +18,7 @@ package com.android.launcher3.uioverrides;
|
||||
|
||||
import static com.android.launcher3.anim.Interpolators.AGGRESSIVE_EASE_IN_OUT;
|
||||
import static com.android.launcher3.anim.Interpolators.LINEAR;
|
||||
import static com.android.launcher3.graphics.OverviewScrim.SCRIM_MULTIPLIER;
|
||||
import static com.android.launcher3.graphics.Scrim.SCRIM_PROGRESS;
|
||||
import static com.android.launcher3.states.StateAnimationConfig.ANIM_OVERVIEW_FADE;
|
||||
import static com.android.launcher3.states.StateAnimationConfig.ANIM_OVERVIEW_MODAL;
|
||||
@@ -70,6 +71,7 @@ public abstract class BaseRecentsViewStateController<T extends RecentsView>
|
||||
getContentAlphaProperty().set(mRecentsView, state.overviewUi ? 1f : 0);
|
||||
OverviewScrim scrim = mLauncher.getDragLayer().getOverviewScrim();
|
||||
SCRIM_PROGRESS.set(scrim, state.getOverviewScrimAlpha(mLauncher));
|
||||
SCRIM_MULTIPLIER.set(scrim, 1f);
|
||||
getTaskModalnessProperty().set(mRecentsView, state.getOverviewModalness());
|
||||
}
|
||||
|
||||
@@ -108,6 +110,8 @@ public abstract class BaseRecentsViewStateController<T extends RecentsView>
|
||||
OverviewScrim scrim = mLauncher.getDragLayer().getOverviewScrim();
|
||||
setter.setFloat(scrim, SCRIM_PROGRESS, toState.getOverviewScrimAlpha(mLauncher),
|
||||
config.getInterpolator(ANIM_OVERVIEW_SCRIM_FADE, LINEAR));
|
||||
setter.setFloat(scrim, SCRIM_MULTIPLIER, 1f,
|
||||
config.getInterpolator(ANIM_OVERVIEW_SCRIM_FADE, LINEAR));
|
||||
|
||||
setter.setFloat(
|
||||
mRecentsView, getTaskModalnessProperty(),
|
||||
|
||||
Reference in New Issue
Block a user