SceneDecoratorStrategyScope


public final class SceneDecoratorStrategyScope<T extends Object> extends SceneStrategyScope


Scope used to create a Scene from another Scene.

This Scope should be provided to the SceneDecoratorStrategy.decorateScene function to create Scenes.

Summary

Public constructors

Construct a SceneDecoratorStrategyScope suitable for calling SceneDecoratorStrategy functions in isolation.

Inherited methods

From androidx.navigation3.scene.SceneStrategyScope
final @NonNull Function0<Unit>

A callback that should be connected to any internal handling of system back done by the returned Scene.

Public constructors

SceneDecoratorStrategyScope

public <T extends Object> SceneDecoratorStrategyScope()

Construct a SceneDecoratorStrategyScope suitable for calling SceneDecoratorStrategy functions in isolation.

For more complicated cases, such as ones where you want to test if onBack is called correctly, use rememberSceneState, which will construct its own internal SceneStrategyScope suitable for a Scene that closely mirror real scenarios and be passed to androidx.navigation3.ui.NavDisplay.