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

Commit 8c68088b authored by Jordan Demeulenaere's avatar Jordan Demeulenaere
Browse files

Change DialogLaunchAnimator X-axis interpolator

This dialog changes the interpolator used to animate the X-axis position
of dialogs during the launch animation. This avoid animating the dialog
out of the screen bounds (see b/208241926#comment1).

Bug: 208241926
Test: Manual
Change-Id: Ia5accb747615fcc8410b5c488ff13617556305be
parent 401bc29f
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -49,7 +49,13 @@ class DialogLaunchAnimator @JvmOverloads constructor(
) {
    private companion object {
        private val TIMINGS = ActivityLaunchAnimator.TIMINGS
        private val INTERPOLATORS = ActivityLaunchAnimator.INTERPOLATORS

        // We use the same interpolator for X and Y axis to make sure the dialog does not move out
        // of the screen bounds during the animation.
        private val INTERPOLATORS = ActivityLaunchAnimator.INTERPOLATORS.copy(
            positionXInterpolator = ActivityLaunchAnimator.INTERPOLATORS.positionInterpolator
        )

        private val TAG_LAUNCH_ANIMATION_RUNNING = R.id.launch_animation_running
    }

+1 −1
Original line number Diff line number Diff line
@@ -172,7 +172,7 @@ class LaunchAnimator(
    )

    /** The interpolators used by this animator. */
    class Interpolators(
    data class Interpolators(
        /** The interpolator used for the Y position, width, height and corner radius. */
        val positionInterpolator: Interpolator,