NavGraphBuilder

class NavGraphBuilder : NavDestinationBuilder<NavGraph>
kotlin.Any
   ↳ androidx.navigation.NavDestinationBuilder<androidx.navigation.NavGraph>
   ↳ androidx.navigation.NavGraphBuilder

DSL for constructing a new NavGraph

Summary

Public constructors

<init>(provider: NavigatorProvider, @IdRes id: Int, @IdRes startDestination: Int)

DSL for constructing a new NavGraph

Public methods

Unit

Add the destination to the NavGraphBuilder

NavGraph

Build the NavDestination by calling Navigator.createDestination.

Unit
destination(navDestination: NavDestinationBuilder<D>)

Build and add a new destination to the NavGraphBuilder

operator Unit

Adds this destination to the NavGraphBuilder

Inherited functions

Extension functions

From androidx.navigation
Unit

Construct a new ActivityNavigator.Destination

Unit
NavGraphBuilder.navigation(@IdRes id: Int, @IdRes startDestination: Int, builder: NavGraphBuilder.() -> Unit)

Construct a nested NavGraph

From androidx.navigation.fragment
Unit

Construct a new DialogFragmentNavigator.Destination

Unit

Construct a new DialogFragmentNavigator.Destination

Unit

Construct a new FragmentNavigator.Destination

Unit

Construct a new FragmentNavigator.Destination

Properties

NavigatorProvider

Inherited properties

Public constructors

<init>

NavGraphBuilder(provider: NavigatorProvider, @IdRes id: Int, @IdRes startDestination: Int)

DSL for constructing a new NavGraph

Public methods

addDestination

fun addDestination(destination: NavDestination): Unit

Add the destination to the NavGraphBuilder

build

fun build(): NavGraph

Build the NavDestination by calling Navigator.createDestination.

destination

fun <D : NavDestination> destination(navDestination: NavDestinationBuilder<D>): Unit

Build and add a new destination to the NavGraphBuilder

unaryPlus

operator fun NavDestination.unaryPlus(): Unit

Adds this destination to the NavGraphBuilder

Properties

provider

val provider: NavigatorProvider