public class

Parallax.FloatProperty

extends <any>

 java.lang.Object

↳<any>

↳androidx.leanback.widget.Parallax.FloatProperty

Overview

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

Summary

Fields
public static final floatUNKNOWN_AFTER

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

public static final floatUNKNOWN_BEFORE

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

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

Constructor.

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

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

public final Parallax.PropertyMarkerValueatAbsolute(float markerValue)

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

public final Parallax.PropertyMarkerValueatFraction(float fractionOfMaxParentVisibleSize)

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.Floatget(Parallax object)

public final intgetIndex()

public final floatgetValue(Parallax object)

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

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

public final voidsetValue(Parallax object, float value)

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

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

Fields

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.

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.

Constructors

public FloatProperty(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.Float get(Parallax object)

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

public final int getIndex()

Returns:

Index of this Property in Parallax.

public final float 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:

Float value of the Property.

public final void setValue(Parallax object, float value)

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

Parameters:

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

public final Parallax.PropertyMarkerValue atAbsolute(float markerValue)

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

Parameters:

markerValue: The float 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 fractionOfMaxParentVisibleSize)

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

Parameters:

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

Returns:

A new Parallax.PropertyMarkerValue object.

public final Parallax.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: An offset float 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.