Loading packages/SystemUI/compose/core/src/com/android/compose/animation/Easings.kt +12 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.compose.animation import androidx.compose.animation.core.CubicBezierEasing import androidx.compose.animation.core.Easing import androidx.core.animation.Interpolator import com.android.app.animation.InterpolatorsAndroidX Loading Loading @@ -59,6 +60,17 @@ object Easings { /** The linear interpolator. */ val Linear = fromInterpolator(InterpolatorsAndroidX.LINEAR) /** * Use this easing for animating progress values coming from the back callback to get the * predictive-back-typical decelerate motion. * * This easing is similar to [StandardDecelerate] but has a slight acceleration phase at the * start. * * See also [InterpolatorsAndroidX.BACK_GESTURE]. */ val PredictiveBack = CubicBezierEasing(0.1f, 0.1f, 0f, 1f) /** The default legacy interpolator as defined in Material 1. Also known as FAST_OUT_SLOW_IN. */ val Legacy = fromInterpolator(InterpolatorsAndroidX.LEGACY) Loading packages/SystemUI/compose/features/src/com/android/systemui/scene/ui/composable/transitions/FromLockscreenToBouncerTransition.kt +2 −2 Original line number Diff line number Diff line package com.android.systemui.scene.ui.composable.transitions import androidx.compose.animation.core.CubicBezierEasing import com.android.compose.animation.Easings import com.android.compose.animation.scene.TransitionBuilder import com.android.systemui.bouncer.ui.composable.Bouncer Loading @@ -9,7 +9,7 @@ fun TransitionBuilder.lockscreenToBouncerTransition() { } fun TransitionBuilder.bouncerToLockscreenPreview() { fractionRange(easing = CubicBezierEasing(0.1f, 0.1f, 0f, 1f)) { fractionRange(easing = Easings.PredictiveBack) { scaleDraw(Bouncer.Elements.Content, scaleY = 0.8f, scaleX = 0.8f) } } Loading
packages/SystemUI/compose/core/src/com/android/compose/animation/Easings.kt +12 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.compose.animation import androidx.compose.animation.core.CubicBezierEasing import androidx.compose.animation.core.Easing import androidx.core.animation.Interpolator import com.android.app.animation.InterpolatorsAndroidX Loading Loading @@ -59,6 +60,17 @@ object Easings { /** The linear interpolator. */ val Linear = fromInterpolator(InterpolatorsAndroidX.LINEAR) /** * Use this easing for animating progress values coming from the back callback to get the * predictive-back-typical decelerate motion. * * This easing is similar to [StandardDecelerate] but has a slight acceleration phase at the * start. * * See also [InterpolatorsAndroidX.BACK_GESTURE]. */ val PredictiveBack = CubicBezierEasing(0.1f, 0.1f, 0f, 1f) /** The default legacy interpolator as defined in Material 1. Also known as FAST_OUT_SLOW_IN. */ val Legacy = fromInterpolator(InterpolatorsAndroidX.LEGACY) Loading
packages/SystemUI/compose/features/src/com/android/systemui/scene/ui/composable/transitions/FromLockscreenToBouncerTransition.kt +2 −2 Original line number Diff line number Diff line package com.android.systemui.scene.ui.composable.transitions import androidx.compose.animation.core.CubicBezierEasing import com.android.compose.animation.Easings import com.android.compose.animation.scene.TransitionBuilder import com.android.systemui.bouncer.ui.composable.Bouncer Loading @@ -9,7 +9,7 @@ fun TransitionBuilder.lockscreenToBouncerTransition() { } fun TransitionBuilder.bouncerToLockscreenPreview() { fractionRange(easing = CubicBezierEasing(0.1f, 0.1f, 0f, 1f)) { fractionRange(easing = Easings.PredictiveBack) { scaleDraw(Bouncer.Elements.Content, scaleY = 0.8f, scaleX = 0.8f) } }