NavController

public class NavController

Known direct subclasses
NavHostController

Subclass of NavController that offers additional APIs for use by a NavHost to connect the NavController to external dependencies.

Known indirect subclasses
TestNavHostController

Subclass of NavHostController that offers additional APIs for testing Navigation.


NavController manages app navigation within a NavHost.

Apps will generally obtain a controller directly from a host, or by using one of the utility methods on the Navigation class rather than create a controller directly.

Navigation flows and destinations are determined by the navigation graph owned by the controller. These graphs are typically getNavInflater from an Android resource, but, like views, they can also be constructed or combined programmatically or for the case of dynamic navigation structure. (For example, if the navigation structure of the application is determined by live data obtained' from a remote server.)

Summary

Nested types

NavController.Companion
NavController.OnDestinationChangedListener

OnDestinationChangedListener receives a callback when the currentDestination or its arguments change.

Public fields

final @NonNull Context
@Nullable NavBackStackEntry

The topmost NavBackStackEntry.

final @NonNull Flow<@NonNull NavBackStackEntry>

A Flow that will emit the currently active NavBackStackEntry whenever it changes.

@Nullable NavDestination

The current destination.

@NonNull NavGraph

The topmost navigation graph associated with this NavController.

@NonNull NavInflater

The inflater for this controller.

@NonNull NavigatorProvider

The NavController's NavigatorProvider.

@Nullable NavBackStackEntry

The previous visible NavBackStackEntry.

Public constructors

Public methods

void

Adds an OnDestinationChangedListener to this controller to receive a callback whenever the currentDestination or its arguments change.

@NonNull NavDeepLinkBuilder

Create a deep link to a destination within this NavController.

@RestrictTo(value = [RestrictTo.Scope.LIBRARY_GROUP]) void
enableOnBackPressed(boolean enabled)
final @RestrictTo(value = [RestrictTo.Scope.LIBRARY_GROUP]) @Nullable NavDestination
findDestination(@IdRes int destinationId)
final @RestrictTo(value = [RestrictTo.Scope.LIBRARY_GROUP]) @Nullable NavDestination
findDestination(@NonNull String destinationRoute)
@NonNull NavBackStackEntry
getBackStackEntry(@IdRes int destinationId)

Gets the topmost NavBackStackEntry for a destination id.

final @NonNull NavBackStackEntry

Gets the topmost NavBackStackEntry for a route.

@NonNull ViewModelStoreOwner
getViewModelStoreOwner(@IdRes int navGraphId)

Gets the ViewModelStoreOwner for a NavGraph.

@MainThread boolean

Checks the given Intent for a Navigation deep link and navigates to the deep link if present.

@MainThread void
navigate(@IdRes int resId)

Navigate to a destination from the current navigation graph.

@MainThread void
navigate(@IdRes int resId, @Nullable Bundle args)

Navigate to a destination from the current navigation graph.

@MainThread void
navigate(
    @IdRes int resId,
    @Nullable Bundle args,
    @Nullable NavOptions navOptions
)

Navigate to a destination from the current navigation graph.

@MainThread void
navigate(
    @IdRes int resId,
    @Nullable Bundle args,
    @Nullable NavOptions navOptions,
    @Nullable Navigator.Extras navigatorExtras
)

Navigate to a destination from the current navigation graph.

@MainThread void
navigate(@NonNull Uri deepLink)

Navigate to a destination via the given deep link Uri.

@MainThread void
navigate(@NonNull Uri deepLink, @Nullable NavOptions navOptions)

Navigate to a destination via the given deep link Uri.

@MainThread void
navigate(
    @NonNull Uri deepLink,
    @Nullable NavOptions navOptions,
    @Nullable Navigator.Extras navigatorExtras
)

Navigate to a destination via the given deep link Uri.

@MainThread void

Navigate to a destination via the given NavDeepLinkRequest.

@MainThread void
navigate(
    @NonNull NavDeepLinkRequest request,
    @Nullable NavOptions navOptions
)

Navigate to a destination via the given NavDeepLinkRequest.

@MainThread void
navigate(
    @NonNull NavDeepLinkRequest request,
    @Nullable NavOptions navOptions,
    @Nullable Navigator.Extras navigatorExtras
)

Navigate to a destination via the given NavDeepLinkRequest.

@MainThread void

Navigate via the given NavDirections

@MainThread void
navigate(
    @NonNull NavDirections directions,
    @Nullable NavOptions navOptions
)

Navigate via the given NavDirections

@MainThread void
navigate(
    @NonNull NavDirections directions,
    @NonNull Navigator.Extras navigatorExtras
)

Navigate via the given NavDirections

final void
navigate(
    @NonNull String route,
    @NonNull Function1<@NonNull NavOptionsBuilderUnit> builder
)

Navigate to a route in the current NavGraph.

final void
navigate(
    @NonNull String route,
    @Nullable NavOptions navOptions,
    @Nullable Navigator.Extras navigatorExtras
)

Navigate to a route in the current NavGraph.

@MainThread boolean

Attempts to navigate up in the navigation hierarchy.

@MainThread boolean

Attempts to pop the controller's back stack.

@MainThread boolean
popBackStack(@IdRes int destinationId, boolean inclusive)

Attempts to pop the controller's back stack back to a specific destination.

@MainThread boolean
popBackStack(
    @IdRes int destinationId,
    boolean inclusive,
    boolean saveState
)

Attempts to pop the controller's back stack back to a specific destination.

final @MainThread boolean
popBackStack(@NonNull String route, boolean inclusive, boolean saveState)

Attempts to pop the controller's back stack back to a specific destination.

void

Removes an OnDestinationChangedListener from this controller.

@CallSuper void

Restores all navigation controller state from a bundle.

@CallSuper @Nullable Bundle

Saves all navigation controller state to a Bundle.

@MainThread @CallSuper void
setGraph(@NavigationRes int graphResId)

Sets the navigation graph to the specified resource.

@MainThread @CallSuper void
setGraph(
    @NavigationRes int graphResId,
    @Nullable Bundle startDestinationArgs
)

Sets the navigation graph to the specified resource.

@MainThread @CallSuper void
setGraph(@NonNull NavGraph graph, @Nullable Bundle startDestinationArgs)

Sets the navigation graph to the specified graph.

@RestrictTo(value = [RestrictTo.Scope.LIBRARY_GROUP]) void
@RestrictTo(value = [RestrictTo.Scope.LIBRARY_GROUP]) void
@RestrictTo(value = [RestrictTo.Scope.LIBRARY_GROUP]) void

Public fields

context

@NonNull
public final @NonNull Context context

currentBackStackEntry

@Nullable
public @Nullable NavBackStackEntry currentBackStackEntry

The topmost NavBackStackEntry.

Returns
@Nullable NavBackStackEntry

the topmost entry on the back stack or null if the back stack is empty

currentBackStackEntryFlow

@NonNull
public final @NonNull Flow<@NonNull NavBackStackEntrycurrentBackStackEntryFlow

A Flow that will emit the currently active NavBackStackEntry whenever it changes. If there is no active NavBackStackEntry, no item will be emitted.

currentDestination

@Nullable
public @Nullable NavDestination currentDestination

The current destination.

graph

@NonNull
public @NonNull NavGraph graph

The topmost navigation graph associated with this NavController.

When this is set any current navigation graph data (including back stack) will be replaced.

Throws
kotlin.IllegalStateException

if called before setGraph().

See also
setGraph
@NonNull
public @NonNull NavInflater navInflater

The inflater for this controller.

Returns
@NonNull NavInflater

inflater for loading navigation resources

@NonNull
public @NonNull NavigatorProvider navigatorProvider

The NavController's NavigatorProvider. All Navigators used to construct the navigation graph for this nav controller should be added to this navigator provider before the graph is constructed.

This can only be set before the graph is set via setGraph().

Generally, the Navigators are set for you by the NavHost hosting this NavController and you do not need to manually interact with the navigator provider.

Throws
kotlin.IllegalStateException

If this set called after setGraph()

previousBackStackEntry

@Nullable
public @Nullable NavBackStackEntry previousBackStackEntry

The previous visible NavBackStackEntry.

This skips over any NavBackStackEntry that is associated with a NavGraph.

Returns
@Nullable NavBackStackEntry

the previous visible entry on the back stack or null if the back stack has less than two visible entries

Public constructors

@NonNull
public final NavController(@NonNull Context context)

Public methods

addOnDestinationChangedListener

@NonNull
public void addOnDestinationChangedListener(
    @NonNull NavController.OnDestinationChangedListener listener
)

Adds an OnDestinationChangedListener to this controller to receive a callback whenever the currentDestination or its arguments change.

The current destination, if any, will be immediately sent to your listener.

Parameters
@NonNull NavController.OnDestinationChangedListener listener

the listener to receive events

createDeepLink

@NonNull
public NavDeepLinkBuilder createDeepLink()

Create a deep link to a destination within this NavController.

Returns
NavDeepLinkBuilder

a NavDeepLinkBuilder suitable for constructing a deep link

enableOnBackPressed

@RestrictTo(value = [RestrictTo.Scope.LIBRARY_GROUP])
@NonNull
public @RestrictTo(value = [RestrictTo.Scope.LIBRARY_GROUP]) void enableOnBackPressed(boolean enabled)

findDestination

@RestrictTo(value = [RestrictTo.Scope.LIBRARY_GROUP])
@Nullable
public final @RestrictTo(value = [RestrictTo.Scope.LIBRARY_GROUP]) NavDestination findDestination(@IdRes int destinationId)

findDestination

@RestrictTo(value = [RestrictTo.Scope.LIBRARY_GROUP])
@Nullable
public final @RestrictTo(value = [RestrictTo.Scope.LIBRARY_GROUP]) NavDestination findDestination(@NonNull String destinationRoute)

getBackStackEntry

@NonNull
public NavBackStackEntry getBackStackEntry(@IdRes int destinationId)

Gets the topmost NavBackStackEntry for a destination id.

This is always safe to use with the current destination or its parent or grandparent navigation graphs as these destinations are guaranteed to be on the back stack.

Parameters
@IdRes int destinationId

ID of a destination that exists on the back stack

Throws
kotlin.IllegalArgumentException

if the destination is not on the back stack

getBackStackEntry

@NonNull
public final NavBackStackEntry getBackStackEntry(@NonNull String route)

Gets the topmost NavBackStackEntry for a route.

This is always safe to use with the current destination or its parent or grandparent navigation graphs as these destinations are guaranteed to be on the back stack.

Parameters
@NonNull String route

route of a destination that exists on the back stack

Throws
kotlin.IllegalArgumentException

if the destination is not on the back stack

getViewModelStoreOwner

@NonNull
public ViewModelStoreOwner getViewModelStoreOwner(@IdRes int navGraphId)

Gets the ViewModelStoreOwner for a NavGraph. This can be passed to androidx.lifecycle.ViewModelProvider to retrieve a ViewModel that is scoped to the navigation graph - it will be cleared when the navigation graph is popped off the back stack.

Parameters
@IdRes int navGraphId

ID of a NavGraph that exists on the back stack

Throws
kotlin.IllegalStateException

if called before the NavHost has called NavHostController.setViewModelStore.

kotlin.IllegalArgumentException

if the NavGraph is not on the back stack

handleDeepLink

@MainThread
@NonNull
public @MainThread boolean handleDeepLink(@Nullable Intent intent)

Checks the given Intent for a Navigation deep link and navigates to the deep link if present. This is called automatically for you the first time you set the graph if you've passed in an Activity as the context when constructing this NavController, but should be manually called if your Activity receives new Intents in Activity.onNewIntent.

The types of Intents that are supported include:

Intents created by NavDeepLinkBuilder or createDeepLink. This assumes that the current graph shares the same hierarchy to get to the deep linked destination as when the deep link was constructed. Intents that include a data Uri. This Uri will be checked against the Uri patterns in the NavDeepLinks added via NavDestination.addDeepLink.

The navigation graph should be set before calling this method.

Parameters
@Nullable Intent intent

The Intent that may contain a valid deep link

Returns
@MainThread boolean

True if the navigation controller found a valid deep link and navigated to it.

Throws
kotlin.IllegalStateException

if deep link cannot be accessed from the current destination

See also
addDeepLink
@MainThread
@NonNull
public @MainThread void navigate(@IdRes int resId)

Navigate to a destination from the current navigation graph. This supports both navigating via an action and directly navigating to a destination.

Parameters
@IdRes int resId

an action id or a destination id to navigate to

Throws
kotlin.IllegalStateException

if there is no current navigation node

kotlin.IllegalArgumentException

if the desired destination cannot be found from the current destination

@MainThread
@NonNull
public @MainThread void navigate(@IdRes int resId, @Nullable Bundle args)

Navigate to a destination from the current navigation graph. This supports both navigating via an action and directly navigating to a destination.

Parameters
@IdRes int resId

an action id or a destination id to navigate to

@Nullable Bundle args

arguments to pass to the destination

Throws
kotlin.IllegalStateException

if there is no current navigation node

kotlin.IllegalArgumentException

if the desired destination cannot be found from the current destination

@MainThread
@NonNull
public @MainThread void navigate(
    @IdRes int resId,
    @Nullable Bundle args,
    @Nullable NavOptions navOptions
)

Navigate to a destination from the current navigation graph. This supports both navigating via an action and directly navigating to a destination.

Parameters
@IdRes int resId

an action id or a destination id to navigate to

@Nullable Bundle args

arguments to pass to the destination

@Nullable NavOptions navOptions

special options for this navigation operation

Throws
kotlin.IllegalStateException

if there is no current navigation node

kotlin.IllegalArgumentException

if the desired destination cannot be found from the current destination

@MainThread
@NonNull
public @MainThread void navigate(
    @IdRes int resId,
    @Nullable Bundle args,
    @Nullable NavOptions navOptions,
    @Nullable Navigator.Extras navigatorExtras
)

Navigate to a destination from the current navigation graph. This supports both navigating via an action and directly navigating to a destination.

Parameters
@IdRes int resId

an action id or a destination id to navigate to

@Nullable Bundle args

arguments to pass to the destination

@Nullable NavOptions navOptions

special options for this navigation operation

@Nullable Navigator.Extras navigatorExtras

extras to pass to the Navigator

Throws
kotlin.IllegalStateException

if there is no current navigation node

kotlin.IllegalArgumentException

if the desired destination cannot be found from the current destination

@MainThread
@NonNull
public @MainThread void navigate(@NonNull Uri deepLink)

Navigate to a destination via the given deep link Uri. NavDestination.hasDeepLink should be called on the navigation graph prior to calling this method to check if the deep link is valid. If an invalid deep link is given, an IllegalArgumentException will be thrown.

Parameters
@NonNull Uri deepLink

deepLink to the destination reachable from the current NavGraph

See also
navigate
@MainThread
@NonNull
public @MainThread void navigate(@NonNull Uri deepLink, @Nullable NavOptions navOptions)

Navigate to a destination via the given deep link Uri. NavDestination.hasDeepLink should be called on the navigation graph prior to calling this method to check if the deep link is valid. If an invalid deep link is given, an IllegalArgumentException will be thrown.

Parameters
@NonNull Uri deepLink

deepLink to the destination reachable from the current NavGraph

@Nullable NavOptions navOptions

special options for this navigation operation

See also
navigate
@MainThread
@NonNull
public @MainThread void navigate(
    @NonNull Uri deepLink,
    @Nullable NavOptions navOptions,
    @Nullable Navigator.Extras navigatorExtras
)

Navigate to a destination via the given deep link Uri. NavDestination.hasDeepLink should be called on the navigation graph prior to calling this method to check if the deep link is valid. If an invalid deep link is given, an IllegalArgumentException will be thrown.

Parameters
@NonNull Uri deepLink

deepLink to the destination reachable from the current NavGraph

@Nullable NavOptions navOptions

special options for this navigation operation

@Nullable Navigator.Extras navigatorExtras

extras to pass to the Navigator

See also
navigate
@MainThread
@NonNull
public @MainThread void navigate(@NonNull NavDeepLinkRequest request)

Navigate to a destination via the given NavDeepLinkRequest. NavDestination.hasDeepLink should be called on the navigation graph prior to calling this method to check if the deep link is valid. If an invalid deep link is given, an IllegalArgumentException will be thrown.

Parameters
@NonNull NavDeepLinkRequest request

deepLinkRequest to the destination reachable from the current NavGraph

Throws
kotlin.IllegalArgumentException

if the given deep link request is invalid

@MainThread
@NonNull
public @MainThread void navigate(
    @NonNull NavDeepLinkRequest request,
    @Nullable NavOptions navOptions
)

Navigate to a destination via the given NavDeepLinkRequest. NavDestination.hasDeepLink should be called on the navigation graph prior to calling this method to check if the deep link is valid. If an invalid deep link is given, an IllegalArgumentException will be thrown.

Parameters
@NonNull NavDeepLinkRequest request

deepLinkRequest to the destination reachable from the current NavGraph

@Nullable NavOptions navOptions

special options for this navigation operation

Throws
kotlin.IllegalArgumentException

if the given deep link request is invalid

@MainThread
@NonNull
public @MainThread void navigate(
    @NonNull NavDeepLinkRequest request,
    @Nullable NavOptions navOptions,
    @Nullable Navigator.Extras navigatorExtras
)

Navigate to a destination via the given NavDeepLinkRequest. NavDestination.hasDeepLink should be called on the navigation graph prior to calling this method to check if the deep link is valid. If an invalid deep link is given, an IllegalArgumentException will be thrown.

Parameters
@NonNull NavDeepLinkRequest request

deepLinkRequest to the destination reachable from the current NavGraph

@Nullable NavOptions navOptions

special options for this navigation operation

@Nullable Navigator.Extras navigatorExtras

extras to pass to the Navigator

Throws
kotlin.IllegalArgumentException

if the given deep link request is invalid

@MainThread
@NonNull
public @MainThread void navigate(@NonNull NavDirections directions)

Navigate via the given NavDirections

Parameters
@NonNull NavDirections directions

directions that describe this navigation operation

@MainThread
@NonNull
public @MainThread void navigate(
    @NonNull NavDirections directions,
    @Nullable NavOptions navOptions
)

Navigate via the given NavDirections

Parameters
@NonNull NavDirections directions

directions that describe this navigation operation

@Nullable NavOptions navOptions

special options for this navigation operation

@MainThread
@NonNull
public @MainThread void navigate(
    @NonNull NavDirections directions,
    @NonNull Navigator.Extras navigatorExtras
)

Navigate via the given NavDirections

Parameters
@NonNull NavDirections directions

directions that describe this navigation operation

@NonNull Navigator.Extras navigatorExtras

extras to pass to the Navigator

@NonNull
public final void navigate(
    @NonNull String route,
    @NonNull Function1<@NonNull NavOptionsBuilderUnit> builder
)

Navigate to a route in the current NavGraph. If an invalid route is given, an IllegalArgumentException will be thrown.

Parameters
@NonNull String route

route for the destination

@NonNull Function1<@NonNull NavOptionsBuilderUnit> builder

DSL for constructing a new NavOptions

Throws
kotlin.IllegalArgumentException

if the given route is invalid

@NonNull
public final void navigate(
    @NonNull String route,
    @Nullable NavOptions navOptions,
    @Nullable Navigator.Extras navigatorExtras
)

Navigate to a route in the current NavGraph. If an invalid route is given, an IllegalArgumentException will be thrown.

Parameters
@NonNull String route

route for the destination

@Nullable NavOptions navOptions

special options for this navigation operation

@Nullable Navigator.Extras navigatorExtras

extras to pass to the Navigator

Throws
kotlin.IllegalArgumentException

if the given route is invalid

@MainThread
@NonNull
public @MainThread boolean navigateUp()

Attempts to navigate up in the navigation hierarchy. Suitable for when the user presses the "Up" button marked with a left (or start)-facing arrow in the upper left (or starting) corner of the app UI.

The intended behavior of Up differs from Back when the user did not reach the current destination from the application's own task. e.g. if the user is viewing a document or link in the current app in an activity hosted on another app's task where the user clicked the link. In this case the current activity (determined by the context used to create this NavController) will be finished and the user will be taken to an appropriate destination in this app on its own task.

Returns
@MainThread boolean

true if navigation was successful, false otherwise

popBackStack

@MainThread
@NonNull
public @MainThread boolean popBackStack()

Attempts to pop the controller's back stack. Analogous to when the user presses the system Back button when the associated navigation host has focus.

Returns
@MainThread boolean

true if the stack was popped at least once and the user has been navigated to another destination, false otherwise

popBackStack

@MainThread
@NonNull
public @MainThread boolean popBackStack(@IdRes int destinationId, boolean inclusive)

Attempts to pop the controller's back stack back to a specific destination.

Parameters
@IdRes int destinationId

The topmost destination to retain

boolean inclusive

Whether the given destination should also be popped.

Returns
@MainThread boolean

true if the stack was popped at least once and the user has been navigated to another destination, false otherwise

popBackStack

@MainThread
@NonNull
public @MainThread boolean popBackStack(
    @IdRes int destinationId,
    boolean inclusive,
    boolean saveState
)

Attempts to pop the controller's back stack back to a specific destination.

Parameters
@IdRes int destinationId

The topmost destination to retain

boolean inclusive

Whether the given destination should also be popped.

boolean saveState

Whether the back stack and the state of all destinations between the current destination and the destinationId should be saved for later restoration via NavOptions.Builder.setRestoreState or the restoreState attribute using the same destinationId (note: this matching ID is true whether inclusive is true or false).

Returns
@MainThread boolean

true if the stack was popped at least once and the user has been navigated to another destination, false otherwise

popBackStack

@MainThread
@NonNull
public final @MainThread boolean popBackStack(@NonNull String route, boolean inclusive, boolean saveState)

Attempts to pop the controller's back stack back to a specific destination.

Parameters
@NonNull String route

The topmost destination to retain

boolean inclusive

Whether the given destination should also be popped.

boolean saveState

Whether the back stack and the state of all destinations between the current destination and the route should be saved for later restoration via NavOptions.Builder.setRestoreState or the restoreState attribute using the same route (note: this matching ID is true whether inclusive is true or false).

Returns
@MainThread boolean

true if the stack was popped at least once and the user has been navigated to another destination, false otherwise

removeOnDestinationChangedListener

@NonNull
public void removeOnDestinationChangedListener(
    @NonNull NavController.OnDestinationChangedListener listener
)

Removes an OnDestinationChangedListener from this controller. It will no longer receive callbacks.

Parameters
@NonNull NavController.OnDestinationChangedListener listener

the listener to remove

restoreState

@CallSuper
@NonNull
public @CallSuper void restoreState(@Nullable Bundle navState)

Restores all navigation controller state from a bundle. This should be called before any call to setGraph.

State may be saved to a bundle by calling saveState. Restoring controller state is the responsibility of a NavHost.

Parameters
@Nullable Bundle navState

state bundle to restore

saveState

@CallSuper
@Nullable
public @CallSuper Bundle saveState()

Saves all navigation controller state to a Bundle.

State may be restored from a bundle returned from this method by calling restoreState. Saving controller state is the responsibility of a NavHost.

Returns
@CallSuper Bundle

saved state for this controller

setGraph

@MainThread
@CallSuper
@NonNull
public @MainThread @CallSuper void setGraph(@NavigationRes int graphResId)

Sets the navigation graph to the specified resource. Any current navigation graph data (including back stack) will be replaced.

The inflated graph can be retrieved via graph.

Parameters
@NavigationRes int graphResId

resource id of the navigation graph to inflate

setGraph

@MainThread
@CallSuper
@NonNull
public @MainThread @CallSuper void setGraph(
    @NavigationRes int graphResId,
    @Nullable Bundle startDestinationArgs
)

Sets the navigation graph to the specified resource. Any current navigation graph data (including back stack) will be replaced.

The inflated graph can be retrieved via graph.

Parameters
@NavigationRes int graphResId

resource id of the navigation graph to inflate

@Nullable Bundle startDestinationArgs

arguments to send to the start destination of the graph

setGraph

@MainThread
@CallSuper
@NonNull
public @MainThread @CallSuper void setGraph(@NonNull NavGraph graph, @Nullable Bundle startDestinationArgs)

Sets the navigation graph to the specified graph. Any current navigation graph data (including back stack) will be replaced.

The graph can be retrieved later via graph.

Parameters
@NonNull NavGraph graph

graph to set

See also
setGraph
graph

setLifecycleOwner

@RestrictTo(value = [RestrictTo.Scope.LIBRARY_GROUP])
@NonNull
public @RestrictTo(value = [RestrictTo.Scope.LIBRARY_GROUP]) void setLifecycleOwner(@NonNull LifecycleOwner owner)

setOnBackPressedDispatcher

@RestrictTo(value = [RestrictTo.Scope.LIBRARY_GROUP])
@NonNull
public @RestrictTo(value = [RestrictTo.Scope.LIBRARY_GROUP]) void setOnBackPressedDispatcher(@NonNull OnBackPressedDispatcher dispatcher)

setViewModelStore

@RestrictTo(value = [RestrictTo.Scope.LIBRARY_GROUP])
@NonNull
public @RestrictTo(value = [RestrictTo.Scope.LIBRARY_GROUP]) void setViewModelStore(@NonNull ViewModelStore viewModelStore)