DynamicFragmentNavigator


@<Error class: unknown class>
public final class DynamicFragmentNavigator extends FragmentNavigator


The Navigator that enables navigating to destinations within dynamic feature modules.

Summary

Nested types

Destination for dynamic feature navigator.

Public constructors

DynamicFragmentNavigator(
    @NonNull Context context,
    @NonNull FragmentManager manager,
    int containerId,
    @NonNull DynamicInstallManager installManager
)

Public methods

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

{@inheritDoc}

Inherited methods

From androidx.navigation.fragment.FragmentNavigator
@NonNull Fragment
instantiateFragment(
    @NonNull Context context,
    @NonNull FragmentManager fragmentManager,
    @NonNull String className,
    Bundle args
)

This method is deprecated. Set a custom {@link androidx.fragment.app.FragmentFactory} via {@link FragmentManager#setFragmentFactory(FragmentFactory)} to control instantiation of Fragments.

void
void

{@inheritDoc}

void
Bundle
void
popBackStack(@NonNull NavBackStackEntry popUpTo, boolean savedState)

{@inheritDoc}

From androidx.navigation.Navigator
final @NonNull NavigatorState
final boolean
NavDestination
navigate(
    @NonNull FragmentNavigator.Destination destination,
    SavedState args,
    NavOptions navOptions,
    Navigator.Extras navigatorExtras
)
void
boolean
final void
setAttached(boolean isAttached)

Public constructors

DynamicFragmentNavigator

Added in 2.3.0
public DynamicFragmentNavigator(
    @NonNull Context context,
    @NonNull FragmentManager manager,
    int containerId,
    @NonNull DynamicInstallManager installManager
)

Public methods

createDestination

Added in 2.3.0
public @NonNull DynamicFragmentNavigator.Destination createDestination()
public void navigate(
    @NonNull List<@NonNull NavBackStackEntry> entries,
    NavOptions navOptions,
    Navigator.Extras navigatorExtras
)

{@inheritDoc}

This method should always call FragmentTransaction.setPrimaryNavigationFragment so that the Fragment associated with the new destination can be retrieved with FragmentManager.getPrimaryNavigationFragment.

Note that the default implementation commits the new Fragment asynchronously, so the new Fragment is not instantly available after this call completes.

This call will be ignored if the FragmentManager state has already been saved.