Start native apps faster with the Composables CLI ->
Function

size

Declare the preferred size of the content to be exactly a size dp cube.

size

Source set: Android
public fun SubspaceModifier.size(size: Dp): SubspaceModifier

Declare the preferred size of the content to be exactly a size dp cube.

Parameters

size preferred size in Dp for all dimensions.

size

Source set: Android
public fun SubspaceModifier.size(
    width: Dp = Dp.Unspecified,
    height: Dp = Dp.Unspecified,
    depth: Dp = Dp.Unspecified,
): SubspaceModifier

Declare the preferred size of the content to be exactly width dp along the x dimensions, height dp along the y dimensions, and depth dp along the z dimension, of the Composable's local coordinate space.

Parameters

width preferred width in Dp.
height preferred height in Dp.
depth preferred depth in Dp.

size

Source set: Android
public fun SubspaceModifier.size(size: DpVolumeSize): SubspaceModifier

Declare the preferred size of the content to be exactly size in each of the three dimensions. Applying rotations to an object will also rotate the xyz axes of this modifier.

Parameters

size preferred volume size as a DpVolumeSize.

Last updated: