DynamicActivityNavigator

public final class DynamicActivityNavigator extends Navigator, ActivityNavigator

Object
   ↳ Navigator
     ↳ ActivityNavigator
       ↳ DynamicActivityNavigator

Dynamic feature navigator for Activity destinations.

Summary

Public fields

final boolean

Whether this Navigator is actively being used by a NavController.

Public constructors

DynamicActivityNavigator(
    @NonNull Context context,
    @NonNull DynamicInstallManager installManager
)

Public methods

@NonNull DynamicActivityNavigator.Destination

Construct a new NavDestination associated with this Navigator.

void
navigate(
    @NonNull List<@NonNull NavBackStackEntry> entries,
    @Nullable NavOptions navOptions,
    @Nullable Navigator.Extras navigatorExtras
)

Navigate to a destination.

Inherited methods

From class ActivityNavigator
@Nullable NavDestination
navigate(
    @NonNull ActivityNavigator.Destination destination,
    @Nullable Bundle args,
    @Nullable NavOptions navOptions,
    @Nullable Navigator.Extras navigatorExtras
)

Navigate to a destination.

boolean

Attempt to pop this navigator's back stack, performing the appropriate navigation.

From class Navigator
@CallSuper void

Indicator that this Navigator is actively being used by a NavController.

void

Informational callback indicating that the given backStackEntry has been affected by a NavOptions.shouldLaunchSingleTop operation.

void

Restore any state previously saved in onSaveState.

@Nullable Bundle

Called to ask for a Bundle representing the Navigator's state.

void
popBackStack(@NonNull NavBackStackEntry popUpTo, boolean savedState)

Attempt to pop this navigator's back stack, performing the appropriate navigation.

Public fields

isAttached

@NonNull
public final boolean isAttached

Whether this Navigator is actively being used by a NavController.

This is set to true when onAttach is called.

Public constructors

DynamicActivityNavigator

public final DynamicActivityNavigator(
    @NonNull Context context,
    @NonNull DynamicInstallManager installManager
)

Public methods

createDestination

@NonNull
public DynamicActivityNavigator.Destination createDestination()

Construct a new NavDestination associated with this Navigator.

Any initialization of the destination should be done in the destination's constructor as it is not guaranteed that every destination will be created through this method.

Returns
DynamicActivityNavigator.Destination

a new NavDestination

@NonNull
public void navigate(
    @NonNull List<@NonNull NavBackStackEntry> entries,
    @Nullable NavOptions navOptions,
    @Nullable Navigator.Extras navigatorExtras
)

Navigate to a destination.

Requests navigation to a given destination associated with this navigator in the navigation graph. This method generally should not be called directly; NavController will delegate to it when appropriate.

Parameters
@NonNull List<@NonNull NavBackStackEntry> entries

destination(s) to navigate to

@Nullable NavOptions navOptions

additional options for navigation

@Nullable Navigator.Extras navigatorExtras

extras unique to your Navigator.