IntProperty

open class IntProperty : Property<Parallax<Property<*, *>!>!, Int!>
kotlin.Any
   ↳ android.util.Property<androidx.leanback.widget.Parallax<android.util.Property<*, *>>, kotlin.Int>
   ↳ androidx.leanback.widget.Parallax.IntProperty

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

Summary

Constants

static Int

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

static Int

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

Public constructors

<init>(name: String!, index: Int)

Constructor.

Public methods

Parallax.PropertyMarkerValue<Any!>!
at(offsetValue: Int, fractionOfMaxParentVisibleSize: Float)

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

Parallax.PropertyMarkerValue<Any!>!
atAbsolute(absoluteValue: Int)

Creates an PropertyMarkerValue object for the absolute marker value.

Parallax.PropertyMarkerValue<Any!>!
atFraction(fractionOfMaxValue: Float)

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

Parallax.PropertyMarkerValue<Any!>!

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

Parallax.PropertyMarkerValue<Any!>!

Creates an PropertyMarkerValue object for the marker value representing 0.

Int!
get(object: Parallax<Property<*, *>!>!)

Int

Int
getValue(object: Parallax<Property<*, *>!>!)

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

Unit
set(object: Parallax<Property<*, *>!>!, value: Int!)

Unit
setValue(object: Parallax<Property<*, *>!>!, value: Int)

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

Constants

UNKNOWN_AFTER

static val UNKNOWN_AFTER: Int

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: Integer.MAX_VALUE

UNKNOWN_BEFORE

static val UNKNOWN_BEFORE: Int

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: Integer.MIN_VALUE

Public constructors

<init>

IntProperty(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: Int, fractionOfMaxParentVisibleSize: Float): Parallax.PropertyMarkerValue<Any!>!

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

Parameters
offsetValue Int: An offset integer value to be added to marker value.
fractionOfMaxParentVisibleSize Int: 0 to 1 fraction to multiply with Parallax#getMaxValue() for the marker value.
Return
Parallax.PropertyMarkerValue<Any!>!: A new PropertyMarkerValue object.

atAbsolute

fun atAbsolute(absoluteValue: Int): Parallax.PropertyMarkerValue<Any!>!

Creates an PropertyMarkerValue object for the absolute marker value.

Parameters
absoluteValue Int: The integer marker value.
Return
Parallax.PropertyMarkerValue<Any!>!: A new PropertyMarkerValue object.

atFraction

fun atFraction(fractionOfMaxValue: Float): Parallax.PropertyMarkerValue<Any!>!

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

Parameters
fractionOfMaxValue 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.

get

fun get(object: Parallax<Property<*, *>!>!): Int!

getIndex

fun getIndex(): Int
Return
Int: Index of this Property in Parallax.

getValue

fun getValue(object: Parallax<Property<*, *>!>!): Int

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
Int: Int value of the Property.

set

fun set(object: Parallax<Property<*, *>!>!, value: Int!): Unit

setValue

fun setValue(object: Parallax<Property<*, *>!>!, value: Int): Unit

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

Parameters
object Parallax<Property<*, *>!>!: The Parallax object that owns this Property.
value Parallax<Property<*, *>!>!: Int value of the Property.