NavHost

interface NavHost

Known direct subclasses
NavHostFragment

NavHostFragment provides an area within your layout for self-contained navigation to occur.

Known indirect subclasses
DynamicNavHostFragment

The NavHostFragment for dynamic features.


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:

Summary

Public fields

abstract @NonNull NavController

The navigation controller for this navigation host.

Public fields

@NonNull
public abstract @NonNull NavController navController

The navigation controller for this navigation host.