mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-05 18:36:49 +00:00
OverviewActions - Use launcher state to track modal state.
Test:local Change-Id: I44e25b95095b9a7aac4b4172c9c91fbfbf4d9ec7
This commit is contained in:
@@ -21,6 +21,7 @@ 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.Scrim.SCRIM_PROGRESS;
|
||||
import static com.android.launcher3.states.StateAnimationConfig.ANIM_OVERVIEW_FADE;
|
||||
import static com.android.launcher3.states.StateAnimationConfig.ANIM_OVERVIEW_MODAL;
|
||||
import static com.android.launcher3.states.StateAnimationConfig.ANIM_OVERVIEW_SCALE;
|
||||
import static com.android.launcher3.states.StateAnimationConfig.ANIM_OVERVIEW_SCRIM_FADE;
|
||||
import static com.android.launcher3.states.StateAnimationConfig.ANIM_OVERVIEW_TRANSLATE_X;
|
||||
@@ -66,6 +67,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));
|
||||
getTaskModalnessProperty().set(mRecentsView, state.getOverviewModalness());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -101,8 +103,15 @@ 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(
|
||||
mRecentsView, getTaskModalnessProperty(),
|
||||
toState.getOverviewModalness(),
|
||||
config.getInterpolator(ANIM_OVERVIEW_MODAL, AGGRESSIVE_EASE_IN_OUT));
|
||||
}
|
||||
|
||||
abstract FloatProperty getTaskModalnessProperty();
|
||||
|
||||
/**
|
||||
* Get property for content alpha for the recents view.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user