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 dimension, height dp along the y dimension, 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.
Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: