ContentTransform
How one content of an AnimatedContent replaces another: the target content's enter, the initial content's exit, their paint order, and how the container's size animates.
togetherWith builds one from an EnterTransition and an ExitTransition, and AnimatedContentTransitionScope.using replaces its sizeTransform:
AnimatedContent(
targetState = page,
transitionSpec = { fadeIn() togetherWith fadeOut() using null },
) { Page(it) }Parameters
the paint order of the target content; 0f by default.
how the container's size animates, or null for a container that takes the room both contents need and animates nothing. SizeTransform() by default.
Constructors
Properties
how the content of the state being left disappears.
How the container's size animates, or null for a container that takes the room its content needs. Set with AnimatedContentTransitionScope.using.
how the content of the target state appears.
The paint order of the target content. Content with a higher value paints over content with a lower one; equal values keep composition order, which leaves the target content on top.