public final class NavBackStackEntry implements LifecycleOwner, ViewModelStoreOwner, HasDefaultViewModelProviderFactory, LifecycleOwner, SavedStateRegistryOwner

Representation of an entry in the back stack of a androidx.navigation.NavController. The Lifecycle, ViewModelStore, and SavedStateRegistry provided via this object are valid for the lifetime of this destination on the back stack: when this destination is popped off the back stack, the lifecycle will be destroyed, state will no longer be saved, and ViewModels will be cleared.


Public fields

final Bundle

The arguments used for this entry

final @NonNull NavDestination

The destination associated with this entry

final @NonNull String

The unique ID that serves as the identity of this entry

final @NonNull SavedStateHandle

The SavedStateHandle for this entry.

Public constructors

Public methods

equals(Object other)
@NonNull ViewModelProvider.Factory

Returns the default androidx.lifecycle.ViewModelProvider.Factory that should be used when no custom Factory is provided to the androidx.lifecycle.ViewModelProvider constructors.

@NonNull Lifecycle


@NonNull SavedStateRegistry

Returns owned SavedStateRegistry

@NonNull ViewModelStore



Public fields


public final Bundle arguments

The arguments used for this entry