Start native apps faster with the Composables CLI ->
Function

offset

Offset the content by (x dp, y dp, z dp).

offset

Source set: 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.

Parameters

x horizontal offset in Dp.
y vertical offset in Dp.
z depth offset in Dp.

offset

Source set: Android
public fun VolumeConstraints.offset(
    horizontal: Int = 0,
    vertical: Int = 0,
    depth: Int = 0,
): 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.

Return

a new VolumeConstraints object with offset values.