Function

animateEnterExit

Applies enter and exit visibility transitions to a component in a state layout.

animateEnterExit

Source set: JvmAndAndroid
public fun RemoteModifier.animateEnterExit(
    enter: RemoteEnterTransition = RemoteEnterTransition.FadeIn,
    exit: RemoteExitTransition = RemoteExitTransition.FadeOut,
    spec: RemoteTweenSpec = remoteTween(),
    animationId: Int = -1,
): RemoteModifier

Applies enter and exit visibility transitions to a component in a state layout.

Parameters

enter transition effect when component enters the layout
exit transition effect when component exits the layout
spec animation specification for visibility transitions (e.g. remoteTween)
animationId non-zero identifier for the animation (-1 for default non-shared transition)

Return

a RemoteModifier that applies enter and exit transitions

Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: