The Developer Preview for Android 11 is now available; test it out and share your feedback.

NavDirections

public interface NavDirections

androidx.navigation.NavDirections


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

Summary

Public methods

abstract int getActionId()

Returns a action id to navigate with.

abstract Bundle getArguments()

Returns arguments to pass to the destination

Public methods

getActionId

public abstract int getActionId ()

Returns a action id to navigate with.

Returns
int id of an action

getArguments

public abstract Bundle getArguments ()

Returns arguments to pass to the destination

Returns
Bundle