Function

constrain

Constrains the dimensions of this VolumeConstraints object to fit within the bounds of the other VolumeConstraints object.

constrain

Source set: Android
public fun VolumeConstraints.constrain(otherConstraints: VolumeConstraints): VolumeConstraints

Constrains the dimensions of this VolumeConstraints object to fit within the bounds of the other VolumeConstraints object.

Parameters

otherConstraints the other VolumeConstraints to constrain against.

Return

a new VolumeConstraints object with dimensions constrained within the bounds of otherConstraints.

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: