public object NavDisplay
Object that indicates the features that can be handled by the NavDisplay
Functions
transitionSpec
public fun transitionSpec(
transitionSpec: AnimatedContentTransitionScope<Scene<*>>.() -> ContentTransform?
): Map<String, Any>
Function to be called on the NavEntry.metadata or Scene.metadata to notify the NavDisplay of how the content should be animated using the provided ContentTransform.
IMPORTANT NavDisplay only looks at the Scene.metadata to determine the transitionSpec, it is the responsibility of the Scene.metadata to decide which transitionSpec to return, whether that be from the NavEntry.metadata or something custom.
Parameters
| transitionSpec | the ContentTransform to be used when adding to the backstack. If this is null, the transition will fallback to the transition set on the NavDisplay |
popTransitionSpec
public fun popTransitionSpec(
popTransitionSpec: AnimatedContentTransitionScope<Scene<*>>.() -> ContentTransform?
): Map<String, Any>
Function to be called on the NavEntry.metadata or Scene.metadata to notify the NavDisplay that, when popping from backstack, the content should be animated using the provided ContentTransform.
IMPORTANT NavDisplay only looks at the Scene.metadata to determine the popTransitionSpec, it is the responsibility of the Scene.metadata to decide which popTransitionSpec to return, whether that be from the NavEntry.metadata or something custom.
Parameters
| popTransitionSpec | the ContentTransform to be used when popping from backstack. If this is null, the transition will fallback to the transition set on the NavDisplay |
predictivePopTransitionSpec
public fun predictivePopTransitionSpec(
predictivePopTransitionSpec:
AnimatedContentTransitionScope<Scene<*>>.(
@NavigationEvent.SwipeEdge Int
) -> ContentTransform?
): Map<String, Any>
Function to be called on the NavEntry.metadata or Scene.metadata to notify the NavDisplay that, when popping from backstack using a Predictive back gesture, the content should be animated using the provided ContentTransform.
IMPORTANT NavDisplay only looks at the Scene.metadata to determine the predictivePopTransitionSpec, it is the responsibility of the Scene.metadata to decide which predictivePopTransitionSpec to return, whether that be from the NavEntry.metadata or something custom.
Parameters
| predictivePopTransitionSpec | the ContentTransform to be used when popping from backStack with predictive back gesture. If this is null, the transition will fallback to the transition set on the NavDisplay |
Members
TransitionKey
public object TransitionKey :
NavMetadataKey<AnimatedContentTransitionScope<Scene<*>>.() -> ContentTransform>
The key for NavEntry.metadata or Scene.metadata to notify the NavDisplay of how the content should be animated when adding to the backstack.
IMPORTANT NavDisplay only looks at the Scene.metadata to determine the final ContentTransform. It is the responsibility of the Scene.metadata to decide which ContentTransform to return, whether that be from the NavEntry.metadata or something custom.
HOW TO USE Within the metadata DSL, invoke MetadataScope.put and pass TransitionKey as the key. The value: AnimatedContentTransitionScope<Scene<*>>.() -> ContentTransform? should be the ContentTransform to be used when adding to the backstack.
PopTransitionKey
public object PopTransitionKey :
NavMetadataKey<AnimatedContentTransitionScope<Scene<*>>.() -> ContentTransform>
The key for NavEntry.metadata or Scene.metadata to notify the NavDisplay of how the content should be animated when popping from backstack.
IMPORTANT NavDisplay only looks at the Scene.metadata to determine the final ContentTransform. It is the responsibility of the Scene.metadata to decide which ContentTransform to return, whether that be from the NavEntry.metadata or something custom.
HOW TO USE Within the metadata DSL, invoke MetadataScope.put and pass PopTransitionKey as the key. The value: AnimatedContentTransitionScope<Scene<*>>.() -> ContentTransform? should be the ContentTransform to be used when popping from the backstack.
PredictivePopTransitionKey
public object PredictivePopTransitionKey :
NavMetadataKey<
AnimatedContentTransitionScope<Scene<*>>.(
@NavigationEvent.SwipeEdge Int
) -> ContentTransform?
>
The key for NavEntry.metadata or Scene.metadata to notify the NavDisplay of how the content should be animated when popping from backstack using a Predictive back gesture.
IMPORTANT NavDisplay only looks at the Scene.metadata to determine the final ContentTransform. It is the responsibility of the Scene.metadata to decide which ContentTransform to return, whether that be from the NavEntry.metadata or something custom.
HOW TO USE Within the metadata DSL, invoke MetadataScope.put and pass PredictivePopTransitionKey as the key. The value: AnimatedContentTransitionScope<Scene<*>>.(Int) -> ContentTransform? should be the ContentTransform to be used when popping from backstack using a Predictive back gesture.