Class

MutableContentTransform

An object that allows manual manipulation of both entering and exiting content during the deferred phase (initiated by DeferredTransitionState.defer) of an AnimatedContent transition.

Source set: Common
public class MutableContentTransform(
    internal val initialTransform: MutableTransform,
    internal val targetTransform: MutableTransform,
)

An object that allows manual manipulation of both entering and exiting content during the deferred phase (initiated by DeferredTransitionState.defer) of an AnimatedContent transition.

Use initialContentTransform to define transformations for the exiting (initial) content, targetContentTransform for the entering (target) content, and sharedElementProgress to interpolate detached shared elements between their initial and target bounds.

Parameters

initialTransform The MutableTransform applied to the exiting (initial) content.
targetTransform The MutableTransform applied to the entering (target) content.

Functions

initialContentTransform

Source set: Common
public fun initialContentTransform(block: TransformScope.(fullSize: IntSize) -> Unit)

Define the manual transformation to apply to the exiting content during the deferred phase.

Parameters

block A lambda that applies transformations to the provided TransformScope.

targetContentTransform

Source set: Common
public fun targetContentTransform(block: TransformScope.(fullSize: IntSize) -> Unit)

Define the manual transformation to apply to the entering content during the deferred phase.

Parameters

block A lambda that applies transformations to the provided TransformScope.

sharedElementProgress

Source set: Common
public fun sharedElementProgress(progress: () -> Float)

Configures the interpolation progress for shared elements configured with SharedTransitionScope.DeferredTransitionBehavior.SeekToTarget via SharedTransitionScope.SharedContentConfig.deferredTransitionBehavior.

During the deferred phase, these shared elements interpolate their bounds between their initial (0f) and target (1f) bounds based on progress (clamped to 0f..1f), rather than remaining at their initial bounds (0f).

Parameters

progress lambda returning the current interpolation progress between 0f and 1f
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: