Function

constrainHeight

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

RevenueCat

RevenueCat

Add subscriptions to your apps in minutes

Ad Get started for free

constrainHeight

Android
public fun VolumeConstraints.constrainHeight(height: Int): Int

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

Parameters

height the height value to constrain.

Returns

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