0

When customizing the transition of the AnimatedContent composable, one may use the function togetherWith that runs both enter and exit transitions simultaneously.

AnimatedContent(
    targetState = animationState,
    transitionSpec = {
        fadeIn(tween(durationMillis = FadeInMillis, easing = LinearEasing)) togetherWith
            fadeOut(tween(durationMillis = FadeOutMillis, easing = LinearEasing))
    }
) { targetState ->
    ...
}

However, I would like to run the transitions sequentially, i.e. fade in a target state after an initial state completely faded out. How can one do that?

Hawklike
  • 952
  • 16
  • 23
  • I think you can chain transitions using `+` (the `plus` operator function) – Jorn Aug 25 '23 at 11:44
  • No it also do the transitions simultaneously. Here is the doc explanation for it: `Combines different enter transitions. The order of the EnterTransitions being combined does not matter, as these EnterTransitions will start simultaneously.` – Atul Sharma Aug 25 '23 at 12:33

0 Answers0