Save the date! Android Dev Summit is coming to Mountain View, CA on November 7-8, 2018.
Android 0.0.0 Developer Preview
belongs to Maven artifact androidx.leanback:leanback:1.1.0-alpha01

Parallax.IntProperty

public static class Parallax.IntProperty
extends Property<Parallax, Integer>

java.lang.Object
   ↳ android.util.Property<androidx.leanback.widget.Parallax, java.lang.Integer>
     ↳ androidx.leanback.widget.Parallax.IntProperty


IntProperty provide access to an index based integer type property inside Parallax. The IntProperty typically represents UI element position inside Parallax.

Summary

Constants

int UNKNOWN_AFTER

Property value is unknown and it's larger than Parallax.getMaxValue().

int UNKNOWN_BEFORE

Property value is unknown and it's smaller than minimal value of Parallax.

Public constructors

Parallax.IntProperty(String name, int index)

Constructor.

Public methods

final PropertyMarkerValue at(int offsetValue, float fractionOfMaxParentVisibleSize)

Create an Parallax.PropertyMarkerValue object by multiplying the fraction with Parallax.getMaxValue() and adding offsetValue to it.

final PropertyMarkerValue atAbsolute(int absoluteValue)

Creates an Parallax.PropertyMarkerValue object for the absolute marker value.

final PropertyMarkerValue atFraction(float fractionOfMaxValue)

Creates an Parallax.PropertyMarkerValue object for a fraction of Parallax.getMaxValue().

final PropertyMarkerValue atMax()

Creates an Parallax.PropertyMarkerValue object for the marker value representing Parallax.getMaxValue().

final PropertyMarkerValue atMin()

Creates an Parallax.PropertyMarkerValue object for the marker value representing 0.

final Integer get(Parallax object)
final int getIndex()
final int getValue(Parallax object)

Fast version of get() method that returns a primitive int value of the Property.

final void set(Parallax object, Integer value)
final void setValue(Parallax object, int value)

Fast version of set() method that takes a primitive int value into the Property.

Inherited methods

Constants

UNKNOWN_AFTER

public static final int UNKNOWN_AFTER

Property value is unknown and it's larger than Parallax.getMaxValue(). For example if a child is not created and after the last visible child of RecyclerView.

Constant Value: 2147483647 (0x7fffffff)

UNKNOWN_BEFORE

public static final int UNKNOWN_BEFORE

Property value is unknown and it's smaller than minimal value of Parallax. For example if a child is not created and before the first visible child of RecyclerView.

Constant Value: -2147483648 (0x80000000)

Public constructors

Parallax.IntProperty

public Parallax.IntProperty (String name, 
                int index)

Constructor.

Parameters
name String: Name of this Property.

index int: Index of this Property inside Parallax.

Public methods

at

public final PropertyMarkerValue at (int offsetValue, 
                float fractionOfMaxParentVisibleSize)

Create an Parallax.PropertyMarkerValue object by multiplying the fraction with Parallax.getMaxValue() and adding offsetValue to it.

Parameters
offsetValue int: An offset integer value to be added to marker value.

fractionOfMaxParentVisibleSize float: 0 to 1 fraction to multiply with Parallax.getMaxValue() for the marker value.

Returns
PropertyMarkerValue A new Parallax.PropertyMarkerValue object.

atAbsolute

public final PropertyMarkerValue atAbsolute (int absoluteValue)

Creates an Parallax.PropertyMarkerValue object for the absolute marker value.

Parameters
absoluteValue int: The integer marker value.

Returns
PropertyMarkerValue A new Parallax.PropertyMarkerValue object.

atFraction

public final PropertyMarkerValue atFraction (float fractionOfMaxValue)

Creates an Parallax.PropertyMarkerValue object for a fraction of Parallax.getMaxValue().

Parameters
fractionOfMaxValue float: 0 to 1 fraction to multiply with Parallax.getMaxValue() for the marker value.

Returns
PropertyMarkerValue A new Parallax.PropertyMarkerValue object.

atMax

public final PropertyMarkerValue atMax ()

Creates an Parallax.PropertyMarkerValue object for the marker value representing Parallax.getMaxValue().

Returns
PropertyMarkerValue A new Parallax.PropertyMarkerValue object.

atMin

public final PropertyMarkerValue atMin ()

Creates an Parallax.PropertyMarkerValue object for the marker value representing 0.

Returns
PropertyMarkerValue A new Parallax.PropertyMarkerValue object.

get

public final Integer get (Parallax object)

Parameters
object Parallax

Returns
Integer

getIndex

public final int getIndex ()

Returns
int Index of this Property in Parallax.

getValue

public final int getValue (Parallax object)

Fast version of get() method that returns a primitive int value of the Property.

Parameters
object Parallax: The Parallax object that owns this Property.

Returns
int Int value of the Property.

set

public final void set (Parallax object, 
                Integer value)

Parameters
object Parallax

value Integer

setValue

public final void setValue (Parallax object, 
                int value)

Fast version of set() method that takes a primitive int value into the Property.

Parameters
object Parallax: The Parallax object that owns this Property.

value int: Int value of the Property.