NavOptionsBuilder
class NavOptionsBuilder
kotlin.Any | |
↳ | androidx.navigation.NavOptionsBuilder |
DSL for constructing a new NavOptions
Summary
Public constructors | |
---|---|
<init>() DSL for constructing a new NavOptions |
Public methods | |
---|---|
Unit |
anim(: AnimBuilder.() -> Unit) Sets any custom Animation or Animator resources that should be used. |
Unit |
popUpTo(@IdRes : Int, : PopUpToBuilder.() -> Unit) Pop up to a given destination before navigating. |
Extension functions | ||
---|---|---|
From androidx.navigation.compose
|
Properties | |
---|---|
Boolean |
Whether this navigation action should launch as single-top (i. |
Int |
Pop up to a given destination before navigating. |
Public constructors
Public methods
anim
fun anim(: AnimBuilder.() -> Unit): Unit
Sets any custom Animation or Animator resources that should be used.
Note: Animator resources are not supported for navigating to a new Activity
popUpTo
fun popUpTo(
@IdRes : Int,
: PopUpToBuilder.() -> Unit
): Unit
Pop up to a given destination before navigating. This pops all non-matching destinations from the back stack until this destination is found.
Properties
launchSingleTop
var launchSingleTop: Boolean
Whether this navigation action should launch as single-top (i.e., there will be at most one copy of a given destination on the top of the back stack).
This functions similarly to how android.content.Intent.FLAG_ACTIVITY_SINGLE_TOP works with activites.
popUpTo
var popUpTo: Int
Pop up to a given destination before navigating. This pops all non-matching destinations from the back stack until this destination is found.