NavigatorProvider
open class NavigatorProvider
kotlin.Any | |
↳ | androidx.navigation.NavigatorProvider |
A NavigationProvider stores a set of Navigator
s that are valid ways to navigate to a destination.
Summary
Public constructors | |
---|---|
<init>() A NavigationProvider stores a set of |
Public methods | |
---|---|
Navigator<out NavDestination!>? |
addNavigator(@NonNull : Navigator<out NavDestination!>) Register a navigator using the name provided by the |
open Navigator<out NavDestination!>? |
addNavigator(@NonNull : String, @NonNull : Navigator<out NavDestination!>) Register a navigator by name. |
T |
getNavigator(@NonNull : Class<T>) Retrieves a registered |
open T |
getNavigator(@NonNull : String) Retrieves a registered |
Extension functions | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
From androidx.navigation
|
||||||||||
From androidx.navigation.dynamicfeatures
|
Public constructors
<init>
NavigatorProvider()
A NavigationProvider stores a set of Navigator
s that are valid ways to navigate to a destination.
Public methods
addNavigator
@Nullable fun addNavigator(@NonNull : Navigator<out NavDestination!>): Navigator<out NavDestination!>?
Register a navigator using the name provided by the Navigator.Name annotation
. destinations
may refer to any registered navigator by name for inflation. If a navigator by this name is already registered, this new navigator will replace it.
Parameters | |
---|---|
navigator |
Navigator<out NavDestination!>: navigator to add |
Return | |
---|---|
Navigator<out NavDestination!>? |
the previously added Navigator for the name provided by the Navigator.Name annotation , if any |
addNavigator
@CallSuper @Nullable open fun addNavigator(
@NonNull : String,
@NonNull : Navigator<out NavDestination!>
): Navigator<out NavDestination!