added in version 25.4.0
belongs to Maven artifact com.android.support:leanback-v17:28.0.0-alpha1

BoundsRule.ValueRule

public static final class BoundsRule.ValueRule
extends Object

java.lang.Object
   ↳ android.support.v17.leanback.graphics.BoundsRule.ValueRule


This class represents individual rules for updating the bounds.

Summary

Public methods

static BoundsRule.ValueRule absoluteValue(int absoluteValue)

Creates ValueRule using an absolute value.

int getAbsoluteValue()
float getFraction()
static BoundsRule.ValueRule inheritFromParent(float fraction)

Creates ValueRule using a fraction of parent size.

static BoundsRule.ValueRule inheritFromParentWithOffset(float fraction, int value)

Creates ValueRule of fraction and offset.

void setAbsoluteValue(int absoluteValue)

Sets the absolute/offset value for rule.

void setFraction(float fraction)

Sets the fractional value (percentage of parent) for this rule.

Inherited methods

From class java.lang.Object

Public methods

absoluteValue

added in version 25.4.0
BoundsRule.ValueRule absoluteValue (int absoluteValue)

Creates ValueRule using an absolute value.

Parameters
absoluteValue int: Absolute value.

Returns
BoundsRule.ValueRule Newly created ValueRule.

getAbsoluteValue

added in version 25.4.0
int getAbsoluteValue ()

Returns
int The current absolute/offset value forrule.

getFraction

added in version 25.4.0
float getFraction ()

Returns
float The current fractional value.

inheritFromParent

added in version 25.4.0
BoundsRule.ValueRule inheritFromParent (float fraction)

Creates ValueRule using a fraction of parent size.

Parameters
fraction float: Percentage of parent.

Returns
BoundsRule.ValueRule Newly created ValueRule.

inheritFromParentWithOffset

added in version 25.4.0
BoundsRule.ValueRule inheritFromParentWithOffset (float fraction, 
                int value)

Creates ValueRule of fraction and offset.

Parameters
fraction float: Percentage of parent.

value int: Offset

Returns
BoundsRule.ValueRule Newly created ValueRule.

setAbsoluteValue

added in version 25.4.0
void setAbsoluteValue (int absoluteValue)

Sets the absolute/offset value for rule.

Parameters
absoluteValue int: Absolute value.

setFraction

added in version 25.4.0
void setFraction (float fraction)

Sets the fractional value (percentage of parent) for this rule.

Parameters
fraction float: Percentage of parent.