added in version 1.0.0
belongs to Maven artifact androidx.leanback:leanback:1.0.0

Parallax.FloatProperty

public static class Parallax.FloatProperty
extends Property<Parallax, Float>

java.lang.Object
   ↳ android.util.Property<androidx.leanback.widget.Parallax, java.lang.Float>
     ↳ androidx.leanback.widget.Parallax.FloatProperty


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

Summary

Constants

float UNKNOWN_AFTER

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

float UNKNOWN_BEFORE

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

Public constructors

Parallax.FloatProperty(String name, int index)

Constructor.

Public methods

final PropertyMarkerValue at(float offsetValue, float fractionOfMaxParentVisibleSize)

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

final PropertyMarkerValue atAbsolute(float markerValue)

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

final PropertyMarkerValue atFraction(float fractionOfMaxParentVisibleSize)

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 Float get(Parallax object)
final int getIndex()
final float getValue(Parallax object)

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

final void set(Parallax object, Float value)
final void setValue(Parallax object, float value)

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

Inherited methods

Constants

UNKNOWN_AFTER

added in version 1.0.0
public static final float 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: 3.4028235E38

UNKNOWN_BEFORE

added in version 1.0.0
public static final float 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: -3.4028235E38

Public constructors

Parallax.FloatProperty

added in version 1.0.0
public Parallax.FloatProperty (String name, 
                int index)

Constructor.

Parameters
name String: Name of this Property.

index int: Index of this Property inside Parallax.

Public methods

at

added in version 1.0.0
public final PropertyMarkerValue at (float offsetValue, 
                float fractionOfMaxParentVisibleSize)

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

Parameters
offsetValue float: An offset float 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

added in version 1.0.0
public final PropertyMarkerValue atAbsolute (float markerValue)

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

Parameters
markerValue float: The float marker value.

Returns
PropertyMarkerValue A new Parallax.PropertyMarkerValue object.

atFraction

added in version 1.0.0
public final PropertyMarkerValue atFraction (float fractionOfMaxParentVisibleSize)

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

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

Returns
PropertyMarkerValue A new Parallax.PropertyMarkerValue object.

atMax

added in version 1.0.0
public final PropertyMarkerValue atMax ()

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

Returns
PropertyMarkerValue A new Parallax.PropertyMarkerValue object.

atMin

added in version 1.0.0
public final PropertyMarkerValue atMin ()

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

Returns
PropertyMarkerValue A new Parallax.PropertyMarkerValue object.

get

added in version 1.0.0
public final Float get (Parallax object)

Parameters
object Parallax

Returns
Float

getIndex

added in version 1.0.0
public final int getIndex ()

Returns
int Index of this Property in Parallax.

getValue

added in version 1.0.0
public final float 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
float Float value of the Property.

set

added in version 1.0.0
public final void set (Parallax object, 
                Float value)

Parameters
object Parallax

value Float

setValue

added in version 1.0.0
public final void setValue (Parallax object, 
                float value)

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

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

value float: Float value of the Property.