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

Commit 6043d564 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Disabling size animation when switching between lottie animations" into main

parents ef54a716 1d9121cd
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -213,10 +213,14 @@ fun TutorialAnimation(
            transitionSpec = {
                if (initialState == NOT_STARTED && targetState == IN_PROGRESS) {
                    val transitionDurationMillis = 150
                    fadeIn(
                        animationSpec = tween(transitionDurationMillis, easing = LinearEasing)
                    ) togetherWith
                    fadeIn(animationSpec = tween(transitionDurationMillis, easing = LinearEasing))
                        .togetherWith(
                            fadeOut(animationSpec = snap(delayMillis = transitionDurationMillis))
                        )
                        // we explicitly don't want size transform because when targetState
                        // animation is loaded for the first time, AnimatedContent thinks target
                        // size is smaller and tries to shrink initial state animation
                        .using(sizeTransform = null)
                } else {
                    // empty transition works because all remaining transitions are from IN_PROGRESS
                    // state which shares initial animation frame with both FINISHED and NOT_STARTED