DynamicIncludeGraphNavigator

@Navigator.Name(value = "include-dynamic") public final class DynamicIncludeGraphNavigator extends Navigator


Navigator for include-dynamic.

Use it for navigating to NavGraphs contained within a dynamic feature module.

Summary

Nested types

DynamicIncludeGraphNavigator.DynamicIncludeNavGraph

The graph for dynamic-include.

Public constructors

DynamicIncludeGraphNavigator(
    @NonNull Context context,
    @NonNull NavigatorProvider navigatorProvider,
    @NonNull NavInflater navInflater,
    @NonNull DynamicInstallManager installManager
)

Public methods

@NonNull DynamicIncludeGraphNavigator.DynamicIncludeNavGraph

Construct a new NavDestination associated with this Navigator.

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

Navigates to a dynamically included graph from a com.android.dynamic-feature module.

void

Restore any state previously saved in onSaveState.

@Nullable Bundle

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

Inherited methods

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

Navigate to a destination.

@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.

boolean

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

void
popBackStack(@NonNull NavBackStackEntry popUpTo, boolean savedState)

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

Public constructors

DynamicIncludeGraphNavigator

public final DynamicIncludeGraphNavigator(
    @NonNull Context context,
    @NonNull NavigatorProvider navigatorProvider,
    @NonNull NavInflater navInflater,
    @NonNull DynamicInstallManager installManager
)

Public methods

createDestination

@NonNull
public DynamicIncludeGraphNavigator.DynamicIncludeNavGraph 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.

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

Navigates to a dynamically included graph from a com.android.dynamic-feature module.

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.

Throws