Android Dev Summit, October 23-24: two days of technical content, directly from the Android team. Sign-up for livestream updates.

NavDirections

interface NavDirections
androidx.navigation.NavDirections

An interface that describes a navigation operation: action's id and arguments

Summary

Public methods

abstract Int

Returns a action id to navigate with.

abstract Bundle

Returns arguments to pass to the destination

Public methods

getActionId

@IdRes abstract fun getActionId(): Int

Returns a action id to navigate with.

Return
Int: id of an action

getArguments

@NonNull abstract fun getArguments(): Bundle

Returns arguments to pass to the destination