Make all tasks in intermediate carousel have the same size

- Replace fullscreen translation/scale with nonGrid, which applies whenever tasks are not in grid, so that intermediate carousle's tasks have the same size as focused task
- Avoid showing task icon in intermediate carousel as its scaled up. During swipe up, all task icons only appear after gesture is finished consistenly, regardles if it's running task.
- When swipe up from home, make tasks join the grid immediately
- Make pageOffset calculation consider task scale
- Tuned resistance and scale when RecentsView is swiped up

Bug: 187417137
Test: manaul
Change-Id: Ide55a32241a3551a58e12c399c22420562848c70
This commit is contained in:
Alex Chau
2021-05-25 17:24:49 +01:00
parent f9a402c34c
commit 36e9de1199
5 changed files with 102 additions and 163 deletions

View File

@@ -17,6 +17,7 @@
package com.android.launcher3.uioverrides;
import static com.android.launcher3.anim.Interpolators.AGGRESSIVE_EASE_IN_OUT;
import static com.android.launcher3.anim.Interpolators.INSTANT;
import static com.android.launcher3.anim.Interpolators.LINEAR;
import static com.android.launcher3.states.StateAnimationConfig.ANIM_OVERVIEW_FADE;
import static com.android.launcher3.states.StateAnimationConfig.ANIM_OVERVIEW_MODAL;
@@ -113,7 +114,8 @@ public abstract class BaseRecentsViewStateController<T extends RecentsView>
toState.getOverviewModalness(),
config.getInterpolator(ANIM_OVERVIEW_MODAL, LINEAR));
setter.setFloat(mRecentsView, RECENTS_GRID_PROGRESS,
toState.displayOverviewTasksAsGrid(mLauncher.getDeviceProfile()) ? 1f : 0f, LINEAR);
toState.displayOverviewTasksAsGrid(mLauncher.getDeviceProfile()) ? 1f : 0f,
INSTANT);
}
abstract FloatProperty getTaskModalnessProperty();