Android 12 Developer Preview is here! Try it out, and give us your feedback!


open class ActivityNavigator : Navigator<ActivityNavigator.Destination!>
   ↳ androidx.navigation.Navigator<androidx.navigation.ActivityNavigator.Destination>
   ↳ androidx.navigation.ActivityNavigator

ActivityNavigator implements cross-activity navigation.


Nested classes

NavDestination for activity navigation

Extras that can be passed to ActivityNavigator to customize what ActivityOptionsCompat and flags are passed through to the call to ActivityCompat#startActivity(Context, Intent, Bundle).

Public constructors
<init>(@NonNull context: Context)

Public methods
open static Unit

Apply any pop animations in the Intent of the given Activity to a pending transition.

open ActivityNavigator.Destination

open NavDestination?
navigate(@NonNull destination: ActivityNavigator.Destination, @Nullable args: Bundle?, @Nullable navOptions: NavOptions?, @Nullable navigatorExtras: Navigator.Extras?)

open Boolean

Inherited functions

Public constructors


ActivityNavigator(@NonNull context: Context)

Public methods


open static fun applyPopAnimationsToPendingTransition(@NonNull activity: Activity): Unit

Apply any pop animations in the Intent of the given Activity to a pending transition. This should be used in place of Activity#overridePendingTransition(int, int) to get the appropriate pop animations.

activity Activity: An activity started from the ActivityNavigator.


@NonNull open fun createDestination(): ActivityNavigator.Destination
@Nullable open fun navigate(
    @NonNull destination: ActivityNavigator.Destination,
    @Nullable args: Bundle?,
    @Nullable navOptions: NavOptions?,
    @Nullable navigatorExtras: Navigator.Extras?
): NavDestination?


open fun popBackStack(): Boolean