Google 致力于为黑人社区推动种族平等。查看具体举措

NavDestinationBuilder

open class NavDestinationBuilder<out D : NavDestination>
kotlin.Any
   ↳ androidx.navigation.NavDestinationBuilder

DSL for constructing a new NavDestination

Summary

Public constructors
<init>(navigator: Navigator<out D>, @IdRes id: Int)

DSL for constructing a new NavDestination

Public methods
Unit
action(actionId: Int, actionBuilder: NavActionBuilder.() -> Unit)

Adds a new NavAction to the destination

Unit
argument(name: String, argumentBuilder: NavArgumentBuilder.() -> Unit)

Add a NavArgument to this destination.

open D

Build the NavDestination by calling Navigator.createDestination.

Unit
deepLink(uriPattern: String)

Add a deep link to this destination.

Unit
deepLink(navDeepLink: NavDeepLinkDslBuilder.() -> Unit)

Add a deep link to this destination.

Properties
Int

CharSequence?

The descriptive label of the destination

Navigator<out D>

Public constructors

<init>

NavDestinationBuilder(
    navigator: Navigator<out D>,
    @IdRes id: Int)

DSL for constructing a new NavDestination

Public methods

action

fun action(
    actionId: Int,
    actionBuilder: NavActionBuilder.() -> Unit
): Unit

Adds a new NavAction to the destination

argument

fun argument(
    name: String,
    argumentBuilder: NavArgumentBuilder.() -> Unit
): Unit

Add a NavArgument to this destination.

build

open fu