Builder
class Builder
kotlin.Any | |
↳ | androidx.navigation.fragment.FragmentNavigator.Extras.Builder |
Builder for constructing new Extras
instances. The resulting instances are immutable.
Summary
Public constructors | |
---|---|
<init>() Builder for constructing new |
Public methods | |
---|---|
FragmentNavigator.Extras.Builder |
addSharedElement(@NonNull : View, @NonNull : String) Maps the given View in the current Fragment to the given transition name in the Fragment being navigated to. |
FragmentNavigator.Extras.Builder |
addSharedElements(@NonNull : MutableMap<View!, String!>) Adds multiple shared elements for mapping Views in the current Fragment to transitionNames in the Fragment being navigated to. |
FragmentNavigator.Extras |
build() Constructs the final |
Public constructors
<init>
Builder()
Builder for constructing new Extras
instances. The resulting instances are immutable.
Public methods
addSharedElement
@NonNull fun addSharedElement(
@NonNull : View,
@NonNull : String
): FragmentNavigator.Extras.Builder
Maps the given View in the current Fragment to the given transition name in the Fragment being navigated to.
Parameters | |
---|---|
sharedElement |
View: A View in the current Fragment to match with a View in the Fragment being navigated to. |
name |
String: The transitionName of the View in the Fragment being navigated to that should be matched to the shared element. |
Return | |
---|---|
FragmentNavigator.Extras.Builder |
this Builder |
addSharedElements
@NonNull fun addSharedElements(@NonNull : MutableMap<View!, String!>): FragmentNavigator.Extras.Builder
Adds multiple shared elements for mapping Views in the current Fragment to transitionNames in the Fragment being navigated to.
Parameters | |
---|---|
sharedElements |
MutableMap<View!, String!>: Shared element pairs to add |
Return | |
---|---|
FragmentNavigator.Extras.Builder |
this Builder |
build
@NonNull fun build(): FragmentNavigator.Extras
Constructs the final Extras
instance.
Return | |
---|---|
FragmentNavigator.Extras |
An immutable Extras instance. |