Screen

A full-screen destination rendered in the RenderLayer.CONTENT layer.

Implement this interface on an object to define a screen in your navigation graph. Default transition values are null (no animation) for pop transitions and the navigatable defaults for enter/exit; override them as needed.

object HomeScreen : Screen {
override val route = "home"
override val enterTransition = NavTransition.SlideInRight
override val exitTransition = NavTransition.SlideOutLeft

@Composable
override fun Content(params: Params) {
Text("Home")
}
}

See also

Properties

Link copied to clipboard
open override val actionResource: ActionResource?
Link copied to clipboard
open override val elevation: Float

Elevation within the layer (higher = on top)

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override val popEnterTransition: NavTransition?
Link copied to clipboard
open override val popExitTransition: NavTransition?
Link copied to clipboard
open override val renderLayer: RenderLayer

Which layer this navigatable should render in

Link copied to clipboard
abstract val route: String
Link copied to clipboard
open override val titleResource: TitleResource?

Functions

Link copied to clipboard
abstract fun Content(params: Params)
Link copied to clipboard
open suspend fun onLifecycleCreated(lifecycle: BackstackLifecycle)

Called when this navigatable is added to the backstack.

Link copied to clipboard
fun Navigatable.toNavigationEntry(path: String, params: Params = Params.empty(), stackPosition: Int = 0): NavigationEntry

Creates a NavigationEntry for this Navigatable at the given path.