Google berkomitmen untuk mendorong terwujudnya keadilan ras bagi komunitas Kulit Hitam. Lihat caranya.


interface NavHost

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

It is strongly recommended to construct the nav controller by instantiating a NavHostController, which offers additional APIs specifically for a NavHost. The NavHostController should still only be externally accessible as a NavController, rather than directly exposing it as a NavHostController.

Navigation hosts must:

Optionally, a navigation host should consider calling:


Public methods
abstract NavController

Returns the navigation controller for this navigation host.

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

Construct a new NavGraph

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

Construct a new androidx.navigation.NavGraph that supports dynamic navigation destinations

Public methods


@NonNull abstract fun getNavController(): NavController

Returns the navigation controller for this navigation host.

NavController this host's navigation controller