Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0e0d85c2 authored by Winson's avatar Winson Committed by Winson Chung
Browse files

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
parent 1684f521
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -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.
+3 −2
Original line number Diff line number Diff line
@@ -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);