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

Commit cdb99b76 authored by Luca Zuccarini's avatar Luca Zuccarini Committed by Android (Google) Code Review
Browse files

Merge "[3/3] Introduce a new spring-based animation." into main

parents 47f0b821 7f0815cd
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -802,6 +802,7 @@ android_library {
        "SystemUICustomizationTestUtils",
        "androidx.compose.runtime_runtime",
        "kosmos",
        "testables",
        "androidx.test.rules",
    ],
    libs: [
+24 −0
Original line number Diff line number Diff line
@@ -135,6 +135,23 @@ constructor(
                contentAfterFadeInDuration = 183L,
            )

        /**
         * The timings when animating a View into an app using a spring animator.
         *
         * Important: since springs don't have fixed durations, these timings represent fractions of
         * the progress between the spring's initial value and its final value.
         *
         * TODO(b/372858592): make this a separate class explicitly using percentages.
         */
        val SPRING_TIMINGS =
            TransitionAnimator.Timings(
                totalDuration = 1000L,
                contentBeforeFadeOutDelay = 0L,
                contentBeforeFadeOutDuration = 800L,
                contentAfterFadeInDelay = 850L,
                contentAfterFadeInDuration = 135L,
            )

        /**
         * The timings when animating a Dialog into an app. We need to wait at least 200ms before
         * showing the app (which is under the dialog window) so that the dialog window dim is fully
@@ -152,6 +169,13 @@ constructor(
                contentAfterFadeInInterpolator = PathInterpolator(0f, 0f, 0.6f, 1f),
            )

        /** The interpolators when animating a View into an app using a spring animator. */
        val SPRING_INTERPOLATORS =
            INTERPOLATORS.copy(
                contentBeforeFadeOutInterpolator = Interpolators.DECELERATE_1_5,
                contentAfterFadeInInterpolator = Interpolators.SLOW_OUT_LINEAR_IN,
            )

        // TODO(b/288507023): Remove this flag.
        @JvmField val DEBUG_TRANSITION_ANIMATION = Build.IS_DEBUGGABLE

+412 −31

File changed.

Preview size limit exceeded, changes collapsed.

+350 −251

File changed.

Preview size limit exceeded, changes collapsed.

+375 −0

File added.

Preview size limit exceeded, changes collapsed.

Loading