ValueRule
class ValueRule
kotlin.Any | |
↳ | androidx.leanback.graphics.BoundsRule.ValueRule |
This class represents individual rules for updating the bounds.
Summary
Public methods | |
---|---|
static BoundsRule.ValueRule! |
absoluteValue(absoluteValue: Int) Creates ValueRule using an absolute value. |
Int | |
Float | |
static BoundsRule.ValueRule! |
inheritFromParent(fraction: Float) Creates ValueRule using a fraction of parent size. |
static BoundsRule.ValueRule! |
inheritFromParentWithOffset(fraction: Float, value: Int) Creates ValueRule of fraction and offset. |
Unit |
setAbsoluteValue(absoluteValue: Int) Sets the absolute/offset value for rule. |
Unit |
setFraction(fraction: Float) Sets the fractional value (percentage of parent) for this rule. |
Public methods
absoluteValue
static fun absoluteValue(absoluteValue: Int): BoundsRule.ValueRule!
Creates ValueRule using an absolute value.
Parameters | |
---|---|
absoluteValue |
Int: Absolute value. |
Return | |
---|---|
BoundsRule.ValueRule! |
Newly created ValueRule. |
inheritFromParent
static fun inheritFromParent(fraction: Float): BoundsRule.ValueRule!
Creates ValueRule using a fraction of parent size.
Parameters | |
---|---|
fraction |
Float: Percentage of parent. |
Return | |
---|---|
BoundsRule.ValueRule! |
Newly created ValueRule. |
inheritFromParentWithOffset
static fun inheritFromParentWithOffset(
fraction: Float,
value: Int
): BoundsRule.ValueRule!
Creates ValueRule of fraction and offset.
Parameters | |
---|---|
fraction |
Float: Percentage of parent. |
value |
Int: Offset |
Return | |
---|---|
BoundsRule.ValueRule! |
Newly created ValueRule. |
setAbsoluteValue
fun setAbsoluteValue(absoluteValue: Int): Unit
Sets the absolute/offset value for rule.
Parameters | |
---|---|
absoluteValue |
Int: Absolute value. |