Save the date! Android Dev Summit is coming to Sunnyvale, CA on Oct 23-24, 2019.

ActivityNavigator

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

ActivityNavigator implements cross-activity navigation.

Summary

Nested classes
open

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 NavDestination?
navigate(@NonNull destination: ActivityNavigator.Destination, @Nullable args: Bundle?, @Nullable navOptions: NavOptions?, @Nullable navigatorExtras: Navigator.Extras?)

open ActivityNavigator.Destination

open Boolean

open static Unit

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

Inherited functions

Public constructors

<init>

ActivityNavigator(@NonNull context: Context)

Public methods

navigate

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

createDestination

@NonNull open fun createDestination(): ActivityNavigator.Destination

popBackStack

open fun popBackStack(): Boolean

applyPopAnimationsToPendingTransition

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.

Parameters
activity Activity: An activity started from the ActivityNavigator.