SpatialDialogProperties

class SpatialDialogProperties


Properties for configuring a SpatialDialog.

See also
SpatialDialog

Summary

Public constructors

SpatialDialogProperties(
    dismissOnBackPress: Boolean,
    dismissOnClickOutside: Boolean,
    usePlatformDefaultWidth: Boolean,
    restingLevelAnimationSpec: FiniteAnimationSpec<Float>,
    spatialElevationLevel: SpatialElevationLevel
)

Public functions

SpatialDialogProperties
copy(
    dismissOnBackPress: Boolean,
    dismissOnClickOutside: Boolean,
    usePlatformDefaultWidth: Boolean,
    restingLevelAnimationSpec: FiniteAnimationSpec<Float>,
    spatialElevationLevel: SpatialElevationLevel
)
open operator Boolean
equals(other: Any?)
open Int
open String

Public properties

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.

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.

SpatialElevationLevel

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,
    restingLevelAnimationSpec: FiniteAnimationSpec<Float> = spring(),
    spatialElevationLevel: SpatialElevationLevel = SpatialElevationLevel.DialogDefault
)

Public functions

copy

fun copy(
    dismissOnBackPress: Boolean = this.dismissOnBackPress,
    dismissOnClickOutside: Boolean = this.dismissOnClickOutside,
    usePlatformDefaultWidth: Boolean = this.usePlatformDefaultWidth,
    restingLevelAnimationSpec: FiniteAnimationSpec<Float> = this.restingLevelAnimationSpec,
    spatialElevationLevel: SpatialElevationLevel = this.spatialElevationLevel
): SpatialDialogProperties

equals

open operator fun equals(other: Any?): Boolean

hashCode

open fun hashCode(): Int

toString

open fun toString(): String

Public properties

dismissOnBackPress

Added in 1.0.0-alpha04
val dismissOnBackPressBoolean

whether the dialog should be dismissed when the device's back button is pressed. Defaults to true.

dismissOnClickOutside

Added in 1.0.0-alpha04
val dismissOnClickOutsideBoolean

whether the dialog should be dismissed when the user touches outside of it. Defaults to true.

restingLevelAnimationSpec

Added in 1.0.0-alpha04
val restingLevelAnimationSpecFiniteAnimationSpec<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.

spatialElevationLevel

Added in 1.0.0-alpha04
val spatialElevationLevelSpatialElevationLevel

the elevation level of the dialog. Defaults to SpatialElevationLevel.DialogDefault.

usePlatformDefaultWidth

Added in 1.0.0-alpha04
val usePlatformDefaultWidthBoolean

whether the dialog should use the platform's default width. Defaults to true. This is only used in non-spatial environments.