Function

offset

Creates a new VolumeConstraints object by offsetting the minimum and maximum values of this one.

RevenueCat

RevenueCat

Add subscriptions to your apps in minutes

Ad Get started for free

offset

Android
public fun VolumeConstraints.offset(
    horizontal: Int = 0,
    vertical: Int = 0,
    depth: Int = 0,
    resetMins: Boolean = false,
): VolumeConstraints

Creates a new VolumeConstraints object by offsetting the minimum and maximum values of this one.

Parameters

horizontal the horizontal offset to apply.
vertical the vertical offset to apply.
depth the depth offset to apply.
resetMins if true, the minimum values in the new constraints will be set to 0, otherwise. they will be offset.

Returns

a new VolumeConstraints object with offset values.

offset

Android
public fun SubspaceModifier.offset(x: Dp = 0.dp, y: Dp = 0.dp, z: Dp = 0.dp): SubspaceModifier

Offset the content by (x dp, y dp, z dp). The offsets can be positive as well as non-positive.

This modifier will automatically adjust the horizontal offset according to the layout direction: when the layout direction is LTR, positive x offsets will move the content to the right and when the layout direction is RTL, positive x offsets will move the content to the left. For a modifier that offsets without considering layout direction, see absoluteOffset.