Function

constrainWidth

Constrains a given width value to fit within the bounds of this VolumeConstraints object.

constrainWidth

Source set: Android
public fun VolumeConstraints.constrainWidth(width: Int): Int

Constrains a given width value to fit within the bounds of this VolumeConstraints object.

Parameters

width the width value to constrain.

Returns

the constrained width value, ensuring it's within the minimum and maximum width bounds.

Last updated: