NavHost

interface NavHost
androidx.navigation.NavHost

A host is a single context or container for navigation via a NavController.

Navigation hosts must:

Optionally, a navigation host should consider calling:

Summary

Public methods

abstract NavController

Returns the navigation controller for this navigation host.

Extension functions

From androidx.navigation
NavGraph
NavHost.createGraph(@IdRes id: Int = 0, @IdRes startDestination: Int, builder: NavGraphBuilder.() -> Unit)

Construct a new NavGraph

Public methods

getNavController

@NonNull abstract fun getNavController(): NavController

Returns the navigation controller for this navigation host.

Return
NavController: this host's navigation controller