public abstract class Navigator<D extends NavDestination>

Known direct subclasses

ActivityNavigator implements cross-activity navigation.


Navigator that uses


Navigator for include-dynamic.


Navigator that navigates through FragmentTransaction.


A Navigator built specifically for NavGraph elements.

Known indirect subclasses

Dynamic feature navigator for Activity destinations.


The Navigator that enables navigating to destinations within dynamic feature modules.


Navigator for graphs in dynamic feature modules.

Navigator defines a mechanism for navigating within an app.

Each Navigator sets the policy for a specific type of navigation, e.g. ActivityNavigator knows how to launch into destinations backed by activities using Context.startActivity.

Navigators should be able to manage their own back stack when navigating between two destinations that belong to that navigator. The NavController manages a back stack of navigators representing the current navigation stack across all navigators.

Each Navigator should add the Navigator.Name annotation to their class. Any custom attributes used by the associated destination subclass should have a name corresponding with the name of the Navigator, e.g., ActivityNavigator uses <declare-styleable name="ActivityNavigator">

<D extends NavDestination>

the subclass of NavDestination used with this Navigator which can be used to hold any special data that will be needed to navigate to that destination. Examples include information about an intent to navigate to other activities, or a fragment class name to instantiate and swap to a new fragment.


Nested types


Interface indicating that this class should be passed to its respective Navigator to enable Navigator specific behavior.


This annotation should be added to each Navigator subclass to denote the default name used to register the Navigator with a NavigatorProvider.

Public fields

final boolean

Whether this Navigator is actively being used by a NavController.

Public constructors

<D extends NavDestination> Navigator()

Public methods

abstract @NonNull D