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

Commit 39b5534b authored by Tony Wickham's avatar Tony Wickham Committed by Android (Google) Code Review
Browse files

Merge "Small updates for recents launch animation" into ub-launcher3-master

parents 4f521af2 b8f7d9a3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -34,7 +34,7 @@
    <!-- Launcher app transition -->
    <dimen name="content_trans_y">25dp</dimen>
    <dimen name="workspace_trans_y">80dp</dimen>
    <dimen name="recents_adjacent_trans_x">120dp</dimen>
    <dimen name="recents_adjacent_trans_x">140dp</dimen>
    <dimen name="recents_adjacent_trans_y">80dp</dimen>
    <fraction name="recents_adjacent_scale">150%</fraction>
</resources>
+6 −8
Original line number Diff line number Diff line
@@ -372,26 +372,24 @@ public class LauncherAppTransitionManagerImpl extends LauncherAppTransitionManag
        } else {
            // We are launching an adjacent task, so parallax the center and other adjacent task.
            TaskView centerTask = (TaskView) recentsView.getPageAt(centerTaskIndex);
            float translationX = Math.abs(v.getTranslationX());
            ObjectAnimator centerTaskParallaxToRight =
            float translationX = mRecentsTransX / 2;
            ObjectAnimator centerTaskParallaxOffscreen =
                    LauncherAnimUtils.ofPropertyValuesHolder(centerTask,
                            new PropertyListBuilder()
                                    .scale(v.getScaleX())
                                    .translationX(isRtl ? -translationX : translationX)
                                    .build());
            launcherAnimator.play(centerTaskParallaxToRight);
            launcherAnimator.play(centerTaskParallaxOffscreen);
            int otherAdjacentTaskIndex = centerTaskIndex + (centerTaskIndex - launchedTaskIndex);
            if (otherAdjacentTaskIndex >= 0
                    && otherAdjacentTaskIndex < recentsView.getPageCount()) {
                TaskView otherAdjacentTask = (TaskView) recentsView.getPageAt(
                        otherAdjacentTaskIndex);
                ObjectAnimator otherAdjacentTaskParallaxToRight =
                ObjectAnimator otherAdjacentTaskParallaxOffscreen =
                        LauncherAnimUtils.ofPropertyValuesHolder(otherAdjacentTask,
                                new PropertyListBuilder()
                                        .translationX(otherAdjacentTask.getTranslationX()
                                                + (isRtl ? -translationX : translationX))
                                        .translationX(isRtl ? -translationX : translationX)
                                        .build());
                launcherAnimator.play(otherAdjacentTaskParallaxToRight);
                launcherAnimator.play(otherAdjacentTaskParallaxOffscreen);
            }
        }