2D Recents: to and from home, animate task views as a block
am: 45c8048f4f
Change-Id: If1ac217e5ee00ead66f87c5031203a7a95f8122d
This commit is contained in:
@@ -105,6 +105,7 @@ public class TaskStackAnimationHelper {
|
|||||||
private static final Interpolator ENTER_WHILE_DOCKING_INTERPOLATOR =
|
private static final Interpolator ENTER_WHILE_DOCKING_INTERPOLATOR =
|
||||||
Interpolators.LINEAR_OUT_SLOW_IN;
|
Interpolators.LINEAR_OUT_SLOW_IN;
|
||||||
|
|
||||||
|
private final int mEnterAndExitFromHomeTranslationOffset;
|
||||||
private TaskStackView mStackView;
|
private TaskStackView mStackView;
|
||||||
|
|
||||||
private TaskViewTransform mTmpTransform = new TaskViewTransform();
|
private TaskViewTransform mTmpTransform = new TaskViewTransform();
|
||||||
@@ -113,6 +114,8 @@ public class TaskStackAnimationHelper {
|
|||||||
|
|
||||||
public TaskStackAnimationHelper(Context context, TaskStackView stackView) {
|
public TaskStackAnimationHelper(Context context, TaskStackView stackView) {
|
||||||
mStackView = stackView;
|
mStackView = stackView;
|
||||||
|
mEnterAndExitFromHomeTranslationOffset = Recents.getConfiguration().isGridEnabled
|
||||||
|
? 0 : DOUBLE_FRAME_OFFSET_MS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -260,7 +263,7 @@ public class TaskStackAnimationHelper {
|
|||||||
AnimationProps taskAnimation = new AnimationProps()
|
AnimationProps taskAnimation = new AnimationProps()
|
||||||
.setInitialPlayTime(AnimationProps.BOUNDS,
|
.setInitialPlayTime(AnimationProps.BOUNDS,
|
||||||
Math.min(ENTER_EXIT_NUM_ANIMATING_TASKS, taskIndexFromFront) *
|
Math.min(ENTER_EXIT_NUM_ANIMATING_TASKS, taskIndexFromFront) *
|
||||||
DOUBLE_FRAME_OFFSET_MS)
|
mEnterAndExitFromHomeTranslationOffset)
|
||||||
.setStartDelay(AnimationProps.ALPHA,
|
.setStartDelay(AnimationProps.ALPHA,
|
||||||
Math.min(ENTER_EXIT_NUM_ANIMATING_TASKS, taskIndexFromFront) *
|
Math.min(ENTER_EXIT_NUM_ANIMATING_TASKS, taskIndexFromFront) *
|
||||||
FRAME_OFFSET_MS)
|
FRAME_OFFSET_MS)
|
||||||
@@ -321,7 +324,7 @@ public class TaskStackAnimationHelper {
|
|||||||
AnimationProps taskAnimation;
|
AnimationProps taskAnimation;
|
||||||
if (animated) {
|
if (animated) {
|
||||||
int delay = Math.min(ENTER_EXIT_NUM_ANIMATING_TASKS , taskIndexFromFront) *
|
int delay = Math.min(ENTER_EXIT_NUM_ANIMATING_TASKS , taskIndexFromFront) *
|
||||||
DOUBLE_FRAME_OFFSET_MS;
|
mEnterAndExitFromHomeTranslationOffset;
|
||||||
taskAnimation = new AnimationProps()
|
taskAnimation = new AnimationProps()
|
||||||
.setStartDelay(AnimationProps.BOUNDS, delay)
|
.setStartDelay(AnimationProps.BOUNDS, delay)
|
||||||
.setDuration(AnimationProps.BOUNDS, EXIT_TO_HOME_TRANSLATION_DURATION)
|
.setDuration(AnimationProps.BOUNDS, EXIT_TO_HOME_TRANSLATION_DURATION)
|
||||||
|
|||||||
Reference in New Issue
Block a user