BoundsRule.ValueRule
public
static
final
class
BoundsRule.ValueRule
extends Object
java.lang.Object
|
↳ |
androidx.leanback.graphics.BoundsRule.ValueRule
|
This class represents individual rules for updating the bounds.
Summary
Inherited methods |
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
final
void
|
wait()
|
|
Public methods
absoluteValue
public static BoundsRule.ValueRule absoluteValue (int absoluteValue)
Creates ValueRule using an absolute value.
Parameters |
absoluteValue |
int : Absolute value. |
getAbsoluteValue
public int getAbsoluteValue ()
Returns |
int |
The current absolute/offset value forrule.
|
getFraction
public float getFraction ()
Returns |
float |
The current fractional value.
|
inheritFromParent
public static BoundsRule.ValueRule inheritFromParent (float fraction)
Creates ValueRule using a fraction of parent size.
Parameters |
fraction |
float : Percentage of parent. |
inheritFromParentWithOffset
public static BoundsRule.ValueRule inheritFromParentWithOffset (float fraction,
int value)
Creates ValueRule of fraction and offset.
Parameters |
fraction |
float : Percentage of parent. |
value |
int : Offset |
setAbsoluteValue
public void setAbsoluteValue (int absoluteValue)
Sets the absolute/offset value for rule.
Parameters |
absoluteValue |
int : Absolute value.
|
setFraction
public void setFraction (float fraction)
Sets the fractional value (percentage of parent) for this rule.
Parameters |
fraction |
float : Percentage of parent.
|