Constraints

data class Constraints(val minWidth: Int = 0, val maxWidth: Int = Int.MAX_VALUE, val minHeight: Int = 0, val maxHeight: Int = Int.MAX_VALUE)(source)

Inclusive minimum and maximum size constraints.

Int.MAX_VALUE denotes an unbounded maximum. Every minimum is non-negative and cannot exceed its maximum.

Constructors

Link copied to clipboard
constructor(minWidth: Int = 0, maxWidth: Int = Int.MAX_VALUE, minHeight: Int = 0, maxHeight: Int = Int.MAX_VALUE)

Types

Link copied to clipboard
object Companion

Provides constructors for common constraint sets.

Properties

Link copied to clipboard

the maximum height, or Int.MAX_VALUE for an unbounded height.

Link copied to clipboard

the maximum width, or Int.MAX_VALUE for an unbounded width.

Link copied to clipboard

the minimum height.

Link copied to clipboard

the minimum width.

Functions

Link copied to clipboard

Clamps a size to these constraints.

Link copied to clipboard

Returns whether a size already satisfies these constraints.