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

Commit 565a9dfc authored by Filip Gruszczynski's avatar Filip Gruszczynski
Browse files

Fix thumbnail header animation to follow the app window.

Bug: 25822325
Change-Id: I14c4d877d493cd4fc9397b551099990c31fd471e
parent 444280d2
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -732,7 +732,8 @@ public class AppTransition implements Dump {
        float scaleW = appWidth / thumbWidth;
        float unscaledHeight = thumbHeight * scaleW;
        getNextAppTransitionStartRect(taskId, mTmpRect);
        float unscaledStartY = mTmpRect.top - (unscaledHeight - thumbHeight) / 2f;
        final float unscaledStartY = mTmpRect.top - (unscaledHeight - thumbHeight) / 2f;
        final float toY = appRect.top + mNextAppTransitionInsets.top + -unscaledStartY;
        if (mNextAppTransitionScaleUp) {
            // Animation up from the thumbnail to the full screen
            Animation scale = new ScaleAnimation(1f, scaleW, 1f, scaleW,
@@ -744,7 +745,6 @@ public class AppTransition implements Dump {
            alpha.setDuration(THUMBNAIL_APP_TRANSITION_ALPHA_DURATION);
            final float toX = appRect.left + appRect.width() / 2 -
                    (mTmpRect.left + thumbWidth / 2);
            final float toY = appRect.top + mNextAppTransitionInsets.top + -unscaledStartY;
            Animation translate = new TranslateAnimation(0, toX, 0, toY);
            translate.setInterpolator(mTouchResponseInterpolator);
            translate.setDuration(THUMBNAIL_APP_TRANSITION_DURATION);
@@ -764,8 +764,9 @@ public class AppTransition implements Dump {
            Animation alpha = new AlphaAnimation(0f, 1f);
            alpha.setInterpolator(mThumbnailFadeInInterpolator);
            alpha.setDuration(THUMBNAIL_APP_TRANSITION_ALPHA_DURATION);
            Animation translate = new TranslateAnimation(0, 0, -unscaledStartY +
                    mNextAppTransitionInsets.top, 0);
            final float toX = appRect.left + appRect.width() / 2 -
                    (mTmpRect.left + thumbWidth / 2);
            Animation translate = new TranslateAnimation(toX, 0, toY, 0);
            translate.setInterpolator(mTouchResponseInterpolator);
            translate.setDuration(THUMBNAIL_APP_TRANSITION_DURATION);