Function

constrain

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

RevenueCat

RevenueCat

Add subscriptions to your apps in minutes

Ad Get started for free

constrain

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.

Returns

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