DynamicActivityNavigator


@Navigator.Name(value = "activity")
public final class DynamicActivityNavigator extends ActivityNavigator


Dynamic feature navigator for Activity destinations.

Summary

Nested types

Destination for DynamicActivityNavigator.

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,
    NavOptions navOptions,
    Navigator.Extras navigatorExtras
)

Navigate to a destination.

Inherited methods

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

Navigate to a destination.

boolean

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

From androidx.navigation.Navigator
final @NonNull NavigatorState

The state of the Navigator is the communication conduit between the Navigator and the NavController that has called onAttach.

final boolean

Whether this Navigator is actively being used by a NavController.

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.

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 constructors

DynamicActivityNavigator

Added in 2.3.0
public DynamicActivityNavigator(
    @NonNull Context context,
    @NonNull DynamicInstallManager installManager
)

Public methods

createDestination

Added in 2.3.0
public @NonNull 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
@NonNull DynamicActivityNavigator.Destination

a new NavDestination

public void navigate(
    @NonNull List<@NonNull NavBackStackEntry> entries,
    NavOptions navOptions,
    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

NavOptions navOptions

additional options for navigation

Navigator.Extras navigatorExtras

extras unique to your Navigator.