mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-04 01:46:49 +00:00
Adding a separate state for QuickScrub
Bug: 74014237 Change-Id: Ie86ac589f0ad0e1470fb6b0b71263ec6593eb1e3
This commit is contained in:
@@ -60,10 +60,10 @@ public class RecentsViewStateController implements StateHandler {
|
||||
|
||||
@Override
|
||||
public void setState(LauncherState state) {
|
||||
mWorkspaceCard.setWorkspaceScrollingEnabled(state == OVERVIEW);
|
||||
setVisibility(state == OVERVIEW);
|
||||
setTransitionProgress(state == OVERVIEW ? 1 : 0);
|
||||
if (state == OVERVIEW) {
|
||||
mWorkspaceCard.setWorkspaceScrollingEnabled(state.overviewUi);
|
||||
setVisibility(state.overviewUi);
|
||||
setTransitionProgress(state.overviewUi ? 1 : 0);
|
||||
if (state.overviewUi) {
|
||||
for (int i = mRecentsView.getFirstTaskIndex(); i < mRecentsView.getPageCount(); i++) {
|
||||
((TaskView) mRecentsView.getPageAt(i)).resetVisualProperties();
|
||||
}
|
||||
@@ -92,20 +92,20 @@ public class RecentsViewStateController implements StateHandler {
|
||||
}
|
||||
|
||||
ObjectAnimator progressAnim =
|
||||
mTransitionProgress.animateToValue(toState == OVERVIEW ? 1 : 0);
|
||||
mTransitionProgress.animateToValue(toState.overviewUi ? 1 : 0);
|
||||
progressAnim.setDuration(config.duration);
|
||||
progressAnim.setInterpolator(Interpolators.LINEAR);
|
||||
progressAnim.addListener(new AnimationSuccessListener() {
|
||||
|
||||
@Override
|
||||
public void onAnimationSuccess(Animator animator) {
|
||||
mWorkspaceCard.setWorkspaceScrollingEnabled(toState == OVERVIEW);
|
||||
mWorkspaceCard.setWorkspaceScrollingEnabled(toState.overviewUi);
|
||||
mRecentsView.setCurrentPage(mRecentsView.getPageNearestToCenterOfScreen());
|
||||
}
|
||||
});
|
||||
builder.play(progressAnim);
|
||||
|
||||
ObjectAnimator visibilityAnim = animateVisibility(toState == OVERVIEW);
|
||||
ObjectAnimator visibilityAnim = animateVisibility(toState.overviewUi);
|
||||
visibilityAnim.setDuration(config.duration);
|
||||
visibilityAnim.setInterpolator(Interpolators.LINEAR);
|
||||
builder.play(visibilityAnim);
|
||||
|
||||
Reference in New Issue
Block a user