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

Commit 501e55a0 authored by Filip Gruszczynski's avatar Filip Gruszczynski Committed by Android (Google) Code Review
Browse files

Merge "Fix thumbnail header animation to follow the app window."

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