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 |
String!: 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. |
atAbsolute
fun atAbsolute(markerValue: Float): Parallax.PropertyMarkerValue<Any!>!
Creates an PropertyMarkerValue
object for the absolute marker value.
Parameters | |
---|---|
markerValue |
Float: The float marker value. |
Return | |
---|---|
Parallax.PropertyMarkerValue<Any!>!: A new PropertyMarkerValue object. |
atFraction
fun atFraction(fractionOfMaxParentVisibleSize: Float): Parallax.PropertyMarkerValue<Any!>!
Creates an PropertyMarkerValue
object for a fraction of Parallax#getMaxValue()
.
Parameters | |
---|---|
fractionOfMaxParentVisibleSize |
Float: 0 to 1 fraction to multiply with Parallax#getMaxValue() for the marker value. |
Return | |
---|---|
Parallax.PropertyMarkerValue<Any!>!: A new PropertyMarkerValue object. |
atMax
fun atMax(): Parallax.PropertyMarkerValue<Any!>!
Creates an PropertyMarkerValue
object for the marker value representing Parallax#getMaxValue()
.
Return | |
---|---|
Parallax.PropertyMarkerValue<Any!>!: A new PropertyMarkerValue object. |
atMin
fun atMin(): Parallax.PropertyMarkerValue<Any!>!
Creates an PropertyMarkerValue
object for the marker value representing 0.
Return | |
---|---|
Parallax.PropertyMarkerValue<Any!>!: A new PropertyMarkerValue object. |
getValue
fun getValue(object: Parallax<Property<*, *>!>!): Float
Fast version of get() method that returns a primitive int value of the Property.
Parameters | |
---|---|
object |
Parallax<Property<*, *>!>!: The Parallax object that owns this Property. |
Return | |
---|---|
Float: Float value of the Property. |
setValue
fun setValue(object: Parallax<Property<*, *>!>!, value: Float): Unit
Fast version of set() method that takes a primitive float value into the Property.
Parameters | |
---|---|
object |
Parallax<Property<*, *>!>!: The Parallax object that owns this Property. |
value |
Parallax<Property<*, *>!>!: Float value of the Property. |