BoundsRule


class BoundsRule


This class contains the rules for updating the bounds of a CompositeDrawable.ChildDrawable. It contains four rules, one for each value of the rectangular bound - left/top/right/bottom.

Summary

Nested types

This class represents individual rules for updating the bounds.

Public constructors

BoundsRule(boundsRule: BoundsRule)

Public functions

Unit
calculateBounds(rect: Rect, result: Rect)

Takes in the current bounds and sets the final values based on the individual rules in the result object.

Public properties

BoundsRule.ValueRule?

ValueRule for bottom attribute of BoundsRule

BoundsRule.ValueRule?

ValueRule for left attribute of BoundsRule

BoundsRule.ValueRule?

ValueRule for right attribute of BoundsRule

BoundsRule.ValueRule?

ValueRule for top attribute of BoundsRule

Public constructors

BoundsRule

Added in 1.1.0
BoundsRule()

BoundsRule

Added in 1.1.0
BoundsRule(boundsRule: BoundsRule)

Public functions

calculateBounds

Added in 1.1.0
fun calculateBounds(rect: Rect, result: Rect): Unit

Takes in the current bounds and sets the final values based on the individual rules in the result object.

Parameters
rect: Rect

Represents the current bounds.

result: Rect

Represents the final bounds.

Public properties

bottom

Added in 1.1.0
val bottomBoundsRule.ValueRule?

ValueRule for bottom attribute of BoundsRule

left

Added in 1.1.0
val leftBoundsRule.ValueRule?

ValueRule for left attribute of BoundsRule

right

Added in 1.1.0
val rightBoundsRule.ValueRule?

ValueRule for right attribute of BoundsRule

top

Added in 1.1.0
val topBoundsRule.ValueRule?

ValueRule for top attribute of BoundsRule