added in version 1.0.0
belongs to Maven artifact androidx.leanback:leanback:1.0.0-beta01

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

added in version 1.0.0
public BoundsRule.ValueRule bottom

BoundsRule.ValueRule for bottom attribute of BoundsRule

left

added in version 1.0.0
public BoundsRule.ValueRule left

BoundsRule.ValueRule for left attribute of BoundsRule

right

added in version 1.0.0
public BoundsRule.ValueRule right

BoundsRule.ValueRule for right attribute of BoundsRule

top

added in version 1.0.0
public BoundsRule.ValueRule top

BoundsRule.ValueRule for top attribute of BoundsRule

Public constructors

BoundsRule

added in version 1.0.0
public BoundsRule ()

BoundsRule

added in version 1.0.0
public BoundsRule (BoundsRule boundsRule)

Parameters
boundsRule BoundsRule

Public methods

calculateBounds

added in version 1.0.0
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.