Source set: Common
@ExperimentalDeferredTransitionApi
public class MutableContentTransform(
initialVeilMatchParentSize: Boolean = false,
targetVeilMatchParentSize: Boolean = false,
initialOffsetVelocityProvider: (() -> Offset)? = null,
targetOffsetVelocityProvider: (() -> Offset)? = null,
block: MutableContentTransform.() -> Unit = {},
)
An object that allows manual manipulation of both entering and exiting content during the deferred phase (initiated by DeferredTransitionState.defer) of an AnimatedContent transition.
Parameters
| initialVeilMatchParentSize | Whether the initial content's veil should match the parent size. |
| targetVeilMatchParentSize | Whether the target content's veil should match the parent size. |
| initialOffsetVelocityProvider | The velocity of the offset change for the exiting content in pixels/sec. The initialOffsetVelocityProvider lambda is evaluated exactly once when the deferred phase ends to ensure a seamless handoff to the automatic transition. |
| targetOffsetVelocityProvider | The velocity of the offset change for the entering content in pixels/sec. The targetOffsetVelocityProvider lambda is evaluated exactly once when the deferred phase ends to ensure a seamless handoff to the automatic transition. |
| block | A configuration block to set up the transformations for initial and target content. |
Functions
initialContentTransform
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
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. |