public final class

BoundsRule.ValueRule

extends java.lang.Object

 java.lang.Object

↳androidx.leanback.graphics.BoundsRule.ValueRule

Overview

This class represents individual rules for updating the bounds.

Summary

Methods
public static BoundsRule.ValueRuleabsoluteValue(int absoluteValue)

Creates ValueRule using an absolute value.

public intgetAbsoluteValue()

public floatgetFraction()

public static BoundsRule.ValueRuleinheritFromParent(float fraction)

Creates ValueRule using a fraction of parent size.

public static BoundsRule.ValueRuleinheritFromParentWithOffset(float fraction, int value)

Creates ValueRule of fraction and offset.

public voidsetAbsoluteValue(int absoluteValue)

Sets the absolute/offset value for rule.

public voidsetFraction(float fraction)

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

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Methods

public static BoundsRule.ValueRule inheritFromParent(float fraction)

Creates ValueRule using a fraction of parent size.

Parameters:

fraction: Percentage of parent.

Returns:

Newly created ValueRule.

public static BoundsRule.ValueRule absoluteValue(int absoluteValue)

Creates ValueRule using an absolute value.

Parameters:

absoluteValue: Absolute value.

Returns:

Newly created ValueRule.

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

Creates ValueRule of fraction and offset.

Parameters:

fraction: Percentage of parent.
value: Offset

Returns:

Newly created ValueRule.

public void setFraction(float fraction)

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

Parameters:

fraction: Percentage of parent.

public float getFraction()

Returns:

The current fractional value.

public void setAbsoluteValue(int absoluteValue)

Sets the absolute/offset value for rule.

Parameters:

absoluteValue: Absolute value.

public int getAbsoluteValue()

Returns:

The current absolute/offset value forrule.