interface NavHost

Known direct subclasses

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

Known indirect subclasses

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:


Public fields

abstract @NonNull NavController

The navigation controller for this navigation host.

Public fields

public abstract @NonNull NavController navController

The navigation controller for this navigation host.