mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-04 01:46:49 +00:00
Moving clear all button inside the recents view
Bug: 72222505 Bug: 109828536 Change-Id: I843b79db3e47abc2c41ed78f186b9c941941ddef
This commit is contained in:
@@ -25,7 +25,7 @@ import static com.android.launcher3.anim.Interpolators.LINEAR;
|
||||
import static com.android.quickstep.QuickScrubController.QUICK_SCRUB_START_INTERPOLATOR;
|
||||
import static com.android.quickstep.QuickScrubController.QUICK_SCRUB_TRANSLATION_Y_FACTOR;
|
||||
import static com.android.quickstep.views.LauncherRecentsView.TRANSLATION_Y_FACTOR;
|
||||
import static com.android.quickstep.views.RecentsViewContainer.CONTENT_ALPHA;
|
||||
import static com.android.quickstep.views.RecentsView.CONTENT_ALPHA;
|
||||
|
||||
import android.animation.ValueAnimator;
|
||||
import android.annotation.TargetApi;
|
||||
@@ -40,24 +40,21 @@ import com.android.launcher3.anim.AnimatorSetBuilder;
|
||||
import com.android.launcher3.anim.Interpolators;
|
||||
import com.android.launcher3.anim.PropertySetter;
|
||||
import com.android.quickstep.views.LauncherRecentsView;
|
||||
import com.android.quickstep.views.RecentsViewContainer;
|
||||
|
||||
@TargetApi(Build.VERSION_CODES.O)
|
||||
public class RecentsViewStateController implements StateHandler {
|
||||
|
||||
private final Launcher mLauncher;
|
||||
private final LauncherRecentsView mRecentsView;
|
||||
private final RecentsViewContainer mRecentsViewContainer;
|
||||
|
||||
public RecentsViewStateController(Launcher launcher) {
|
||||
mLauncher = launcher;
|
||||
mRecentsView = launcher.getOverviewPanel();
|
||||
mRecentsViewContainer = launcher.getOverviewPanelContainer();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setState(LauncherState state) {
|
||||
mRecentsViewContainer.setContentAlpha(state.overviewUi ? 1 : 0);
|
||||
mRecentsView.setContentAlpha(state.overviewUi ? 1 : 0);
|
||||
float[] scaleTranslationYFactor = state.getOverviewScaleAndTranslationYFactor(mLauncher);
|
||||
SCALE_PROPERTY.set(mRecentsView, scaleTranslationYFactor[0]);
|
||||
mRecentsView.setTranslationYFactor(scaleTranslationYFactor[1]);
|
||||
@@ -86,7 +83,7 @@ public class RecentsViewStateController implements StateHandler {
|
||||
scaleAndTransYInterpolator);
|
||||
setter.setFloat(mRecentsView, TRANSLATION_Y_FACTOR, scaleTranslationYFactor[1],
|
||||
scaleAndTransYInterpolator);
|
||||
setter.setFloat(mRecentsViewContainer, CONTENT_ALPHA, toState.overviewUi ? 1 : 0,
|
||||
setter.setFloat(mRecentsView, CONTENT_ALPHA, toState.overviewUi ? 1 : 0,
|
||||
builder.getInterpolator(ANIM_OVERVIEW_FADE, AGGRESSIVE_EASE_IN_OUT));
|
||||
|
||||
if (!toState.overviewUi) {
|
||||
|
||||
Reference in New Issue
Block a user