resizable
Source set: Android
public fun SubspaceModifier.resizable(
enabled: Boolean = true,
minimumSize: DpVolumeSize = DpVolumeSize(150.dp, 150.dp, 0.dp),
maximumSize: DpVolumeSize = DpVolumeSize(Dp.Unspecified, Dp.Unspecified, Dp.Unspecified),
maintainAspectRatio: Boolean = false,
resizePolicy: ResizePolicy = ResizePolicy.Default,
): SubspaceModifier
When the resizable modifier is present and enabled, UI controls will be shown that allow the user to resize the element in 3D space.
Parameters
| enabled | Whether resizing is enabled for this object. If false, the object cannot be resized, but any size modifications that already occurred under the current resizePolicy will remain. |
| minimumSize | The minimum allowable size for the object, represented by a DpVolumeSize. The object cannot be scaled down beyond these dimensions. Defaults to a width and height of 150.dp. It may be difficult for a user to grab the resize affordance to re-enlarge an object with a width or height that is smaller than 150.dp. |
| maximumSize | The maximum allowable size for the object, represented by a DpVolumeSize. The object cannot be scaled up beyond these dimensions. Defaults to a DpVolumeSize with all dimensions set to Dp.Unspecified. This default will dynamically determine a safe maximum size that is within hardware rendering capabilities. |
| maintainAspectRatio | If true, the object's aspect ratio (proportions) will be preserved during resizing. If false, individual dimensions can be changed independently. Defaults to false. |
| resizePolicy | The policy that determines how the size change is applied. Defaults to ResizePolicy.Default which automatically handles resizing under the hood. |