Function

sharedBounds

Marks this component as a shared bounds container that smoothly transitions its bounds, position, and styling between states in a state layout.

sharedBounds

Source set: JvmAndAndroid
public fun RemoteModifier.sharedBounds(
    key: Int,
    spec: RemoteTweenSpec = remoteTween(),
    enter: RemoteEnterTransition = RemoteEnterTransition.FadeIn,
    exit: RemoteExitTransition = RemoteExitTransition.FadeOut,
): RemoteModifier

Marks this component as a shared bounds container that smoothly transitions its bounds, position, and styling between states in a state layout.

Parameters

key unique non-zero integer identifier matching this container across states
spec animation specification for bounds and transforms (e.g. remoteTween)
enter transition effect when component enters the layout
exit transition effect when component exits the layout

Return

a RemoteModifier that marks this component as a shared bounds container

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: