FloatProperty
open class FloatProperty : Property<Parallax<Property<*, *>!>!, Float!>
kotlin.Any | ||
↳ | android.util.Property<androidx.leanback.widget.Parallax<android.util.Property<*, *>>, kotlin.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 | |
---|---|
static Float |
Property value is unknown and it's larger than |
static Float |
Property value is unknown and it's smaller than minimal value of Parallax. |
Public constructors | |
---|---|
Constructor. |
Public methods | |
---|---|
Parallax.PropertyMarkerValue<Any!>! |
Create an |
Parallax.PropertyMarkerValue<Any!>! |
atAbsolute(markerValue: Float) Creates an |
Parallax.PropertyMarkerValue<Any!>! |
atFraction(fractionOfMaxParentVisibleSize: Float) Creates an |
Parallax.PropertyMarkerValue<Any!>! |
atMax() Creates an |
Parallax.PropertyMarkerValue<Any!>! |
atMin() Creates an |
Float! | |
Int |
getIndex() |
Float |
Fast version of get() method that returns a primitive int value of the Property. |
Unit | |
Unit |
Fast version of set() method that takes a primitive float value into the Property. |
Constants
UNKNOWN_AFTER
static val UNKNOWN_AFTER: Float
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.
Value: Float.MAX_VALUE
UNKNOWN_BEFORE
static val UNKNOWN_BEFORE: Float
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.
Value: -Float.MAX_VALUE
Public constructors
<init>
FloatProperty(
name: String!,
index: Int)
Constructor.
Parameters | |
---|---|
name |
String!: Name of this Property. |
index |
Int: Index of this Property inside Parallax . |
Public methods
at
fun at(
offsetValue: Float,
fractionOfMaxParentVisibleSize: Float
): Parallax.PropertyMarkerValue<Any!>!
Create an 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. |
Return | |
---|---|
Parallax.PropertyMarkerValue<Any!>! |
A new PropertyMarkerValue object. |