Fixing regression when animating in new views after dismissing task.
- In the old stack, the range of stack task progress was 0..1, but now it needs to be offset by the stack range. Change-Id: I21cb5c7c8c3cc3648867626a516de9ab01e704c8
This commit is contained in:
@@ -504,6 +504,15 @@ public class TaskStackLayoutAlgorithm {
|
||||
return 0f;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the task progress that would put the task just off the front of the stack.
|
||||
*/
|
||||
public float getStackFrontTaskProgress(float stackScroll) {
|
||||
float max = mUnfocusedRange.relativeMax +
|
||||
mFocusState * (mFocusedRange.relativeMax - mUnfocusedRange.relativeMax);
|
||||
return stackScroll + max;
|
||||
}
|
||||
|
||||
/**
|
||||
* Computes the maximum number of visible tasks and thumbnails when the scroll is at the initial
|
||||
* stack scroll. Requires that update() is called first.
|
||||
|
||||
@@ -517,8 +517,9 @@ public class TaskStackView extends FrameLayout implements TaskStack.TaskStackCal
|
||||
} else {
|
||||
if (!hasStackFrontTransform) {
|
||||
hasStackFrontTransform = true;
|
||||
mLayoutAlgorithm.getStackTransform(1f, 0f, mTmpStackFrontTransform,
|
||||
null);
|
||||
mLayoutAlgorithm.getStackTransform(
|
||||
mLayoutAlgorithm.getStackFrontTaskProgress(0f), 0f,
|
||||
mTmpStackFrontTransform, null);
|
||||
}
|
||||
tv.updateViewPropertiesToTaskTransform(mTmpStackFrontTransform, 0, 0,
|
||||
mFastOutSlowInInterpolator, mRequestUpdateClippingListener);
|
||||
|
||||
Reference in New Issue
Block a user