The Android Developer Challenge is back! Submit your idea before December 2.

BoundsRule

public class BoundsRule
extends Object

java.lang.Object
   ↳ androidx.leanback.graphics.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 classes

class BoundsRule.ValueRule

This class represents individual rules for updating the bounds. 

Fields

public BoundsRule.ValueRule bottom

BoundsRule.ValueRule for bottom attribute of BoundsRule

public BoundsRule.ValueRule left

BoundsRule.ValueRule for left attribute of BoundsRule

public BoundsRule.ValueRule right

BoundsRule.ValueRule for right attribute of BoundsRule

public BoundsRule.ValueRule top

BoundsRule.ValueRule for top attribute of BoundsRule

Public constructors

BoundsRule()
BoundsRule(BoundsRule boundsRule)

Public methods

void calculateBounds(Rect rect, Rect result)

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

Inherited methods

Fields

bottom

public BoundsRule.ValueRule bottom

BoundsRule.ValueRule for bottom attribute of BoundsRule

left

public BoundsRule.ValueRule left

BoundsRule.ValueRule for left attribute of BoundsRule

public BoundsRule.ValueRule right

BoundsRule.ValueRule for right attribute of BoundsRule

top

public BoundsRule.ValueRule top

BoundsRule.ValueRule for top attribute of BoundsRule

Public constructors

BoundsRule

public BoundsRule ()

BoundsRule

public BoundsRule (BoundsRule boundsRule)

Parameters
boundsRule BoundsRule

Public methods

calculateBounds

public void calculateBounds (Rect rect, 
                Rect result)

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.