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

Destination

class Destination : NavDestination, FloatingWindow
kotlin.Any
   ↳ androidx.navigation.NavDestination
   ↳ androidx.navigation.fragment.DialogFragmentNavigator.Destination

NavDestination specific to DialogFragmentNavigator.

Summary

Public constructors

<init>(@NonNull navigatorProvider: NavigatorProvider)

Construct a new fragment destination.

<init>(@NonNull fragmentNavigator: Navigator<out DialogFragmentNavigator.Destination!>)

Construct a new fragment destination.

Public methods

String

Gets the DialogFragment's class name associated with this destination

open Unit
onInflate(@NonNull context: Context, @NonNull attrs: AttributeSet)

DialogFragmentNavigator.Destination
setClassName(@NonNull className: String)

Set the DialogFragment class name associated with this destination

Inherited functions

Public constructors

<init>

Destination(@NonNull navigatorProvider: NavigatorProvider)

Construct a new fragment destination. This destination is not valid until you set the Fragment via setClassName(String).

Parameters
navigatorProvider NavigatorProvider: The NavController which this destination will be associated with.

<init>

Destination(@NonNull fragmentNavigator: Navigator<out DialogFragmentNavigator.Destination!>)

Construct a new fragment destination. This destination is not valid until you set the Fragment via setClassName(String).

Parameters
fragmentNavigator Navigator<out DialogFragmentNavigator.Destination!>: The DialogFragmentNavigator which this destination will be associated with. Generally retrieved via a NavController's NavigatorProvider#getNavigator(Class) method.

Public methods

getClassName

@NonNull fun getClassName(): String

Gets the DialogFragment's class name associated with this destination

Exceptions
IllegalStateException when no DialogFragment class was set.

onInflate

@CallSuper open fun onInflate(@NonNull context: Context, @NonNull attrs: AttributeSet): Unit

setClassName

@NonNull fun setClassName(@NonNull className: String): DialogFragmentNavigator.Destination

Set the DialogFragment class name associated with this destination

Parameters
className String: The class name of the DialogFragment to show when you navigate to this destination
Return
DialogFragmentNavigator.Destination: this Destination