public class

Parallax.IntProperty

extends <any>

 java.lang.Object

↳<any>

↳androidx.leanback.widget.Parallax.IntProperty

Subclasses:

RecyclerViewParallax.ChildPositionProperty

Overview

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

Summary

Fields
public static final intUNKNOWN_AFTER

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

public static final intUNKNOWN_BEFORE

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

Constructors
publicIntProperty(java.lang.String name, int index)

Constructor.

Methods
public final Parallax.PropertyMarkerValueat(int offsetValue, float fractionOfMaxParentVisibleSize)

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

public final Parallax.PropertyMarkerValueatAbsolute(int absoluteValue)

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

public final Parallax.PropertyMarkerValueatFraction(float fractionOfMaxValue)

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

public final Parallax.PropertyMarkerValueatMax()

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

public final Parallax.PropertyMarkerValueatMin()

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

public final java.lang.Integerget(Parallax object)

public final intgetIndex()

public final intgetValue(Parallax object)

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

public final voidset(Parallax object, java.lang.Integer value)

public final voidsetValue(Parallax object, int value)

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

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

Fields

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.

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.

Constructors

public IntProperty(java.lang.String name, int index)

Constructor.

Parameters:

name: Name of this Property.
index: Index of this Property inside Parallax.

Methods

public final java.lang.Integer get(Parallax object)

public final void set(Parallax object, java.lang.Integer value)

public final int getIndex()

Returns:

Index of this Property in Parallax.

public final int getValue(Parallax object)

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

Parameters:

object: The Parallax object that owns this Property.

Returns:

Int value of the Property.

public final void setValue(Parallax object, int value)

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

Parameters:

object: The Parallax object that owns this Property.
value: Int value of the Property.

public final Parallax.PropertyMarkerValue atAbsolute(int absoluteValue)

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

Parameters:

absoluteValue: The integer marker value.

Returns:

A new Parallax.PropertyMarkerValue object.

public final Parallax.PropertyMarkerValue atMax()

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

Returns:

A new Parallax.PropertyMarkerValue object.

public final Parallax.PropertyMarkerValue atMin()

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

Returns:

A new Parallax.PropertyMarkerValue object.

public final Parallax.PropertyMarkerValue atFraction(float fractionOfMaxValue)

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

Parameters:

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

Returns:

A new Parallax.PropertyMarkerValue object.

public final Parallax.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: An offset integer value to be added to marker value.
fractionOfMaxParentVisibleSize: 0 to 1 fraction to multiply with Parallax.getMaxValue() for the marker value.

Returns:

A new Parallax.PropertyMarkerValue object.