SpatialDialogProperties
class SpatialDialogProperties
Properties for configuring a SpatialDialog.
| See also | |
|---|---|
SpatialDialog |
Summary
Public constructors |
|---|
SpatialDialogProperties( |
Public functions |
|
|---|---|
SpatialDialogProperties |
|
open operator Boolean |
|
open Int |
hashCode() |
open String |
toString() |
Public properties |
|
|---|---|
FiniteAnimationSpec<Float> |
the animation specification for the depth offset of the app content as it animates away from the user towards its recessed resting level when a spatial dialog is shown. |
Boolean |
whether the dialog should be dismissed when the device's back button is pressed. |
Boolean |
whether the dialog should be dismissed when the user touches outside of it. |
Dp |
the elevation level of the dialog. |
Boolean |
whether the dialog should use the platform's default width. |
Public constructors
SpatialDialogProperties
SpatialDialogProperties(
dismissOnBackPress: Boolean = true,
dismissOnClickOutside: Boolean = true,
usePlatformDefaultWidth: Boolean = true,
backgroundContentAnimationSpec: FiniteAnimationSpec<Float> = spring(),
elevation: Dp = SpatialElevationLevel.DialogDefault
)
Public functions
copy
fun copy(
dismissOnBackPress: Boolean = this.dismissOnBackPress,
dismissOnClickOutside: Boolean = this.dismissOnClickOutside,
usePlatformDefaultWidth: Boolean = this.usePlatformDefaultWidth,
restingLevelAnimationSpec: FiniteAnimationSpec<Float> = this.backgroundContentAnimationSpec,
elevation: Dp = this.elevation
): SpatialDialogProperties
Public properties
backgroundContentAnimationSpec
val backgroundContentAnimationSpec: FiniteAnimationSpec<Float>
the animation specification for the depth offset of the app content as it animates away from the user towards its recessed resting level when a spatial dialog is shown. The same specification is used when the app content animates back towards the user to its original resting level when the dialog is dismissed. This is only used in spatial environments.
dismissOnBackPress
val dismissOnBackPress: Boolean
whether the dialog should be dismissed when the device's back button is pressed. Defaults to true.
dismissOnClickOutside
val dismissOnClickOutside: Boolean
whether the dialog should be dismissed when the user touches outside of it. Defaults to true.
elevation
val elevation: Dp
the elevation level of the dialog. Defaults to SpatialElevationLevel.DialogDefault.
usePlatformDefaultWidth
val usePlatformDefaultWidth: Boolean
whether the dialog should use the platform's default width. Defaults to true. This is only used in non-spatial environments.