BoundsRule


public 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

public final class BoundsRule.ValueRule

This class represents individual rules for updating the bounds.

Public constructors

Public methods

void

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

Public fields

bottom

Added in 1.1.0
public @Nullable BoundsRule.ValueRule bottom

ValueRule for bottom attribute of BoundsRule

left

Added in 1.1.0
public @Nullable BoundsRule.ValueRule left

ValueRule for left attribute of BoundsRule

right

Added in 1.1.0
public @Nullable BoundsRule.ValueRule right

ValueRule for right attribute of BoundsRule

top

Added in 1.1.0
public @Nullable BoundsRule.ValueRule top

ValueRule for top attribute of BoundsRule

Public constructors

BoundsRule

Added in 1.1.0
public BoundsRule()

BoundsRule

Added in 1.1.0
public BoundsRule(@NonNull BoundsRule boundsRule)

Public methods

calculateBounds

Added in 1.1.0
public void calculateBounds(@NonNull Rect rect, @NonNull Rect result)

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

Parameters
@NonNull Rect rect

Represents the current bounds.

@NonNull Rect result

Represents the final bounds.