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 | |
|---|---|
java.lang.Object
| |
Public methods
absoluteValue
BoundsRule.ValueRule absoluteValue (int absoluteValue)
Creates ValueRule using an absolute value.
| Parameters | |
|---|---|
absoluteValue |
int: Absolute value. |
| Returns | |
|---|---|
BoundsRule.ValueRule |
Newly created ValueRule. |
getAbsoluteValue
int getAbsoluteValue ()
| Returns | |
|---|---|
int |
The current absolute/offset value forrule. |
getFraction
float getFraction ()
| Returns | |
|---|---|
float |
The current fractional value. |
inheritFromParent
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
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
void setAbsoluteValue (int absoluteValue)
Sets the absolute/offset value for rule.
| Parameters | |
|---|---|
absoluteValue |
int: Absolute value.
|
setFraction
void setFraction (float fraction)
Sets the fractional value (percentage of parent) for this rule.
| Parameters | |
|---|---|
fraction |
float: Percentage of parent.
|