Added in API level 24

IntProperty


abstract class IntProperty<T : Any!> : Property<T, Int!>
kotlin.Any
   ↳ android.util.Property<T, kotlin.Int>
   ↳ android.util.IntProperty

An implementation of android.util.Property to be used specifically with fields of type int. This type-specific subclass enables performance benefit by allowing calls to a setValue() function that takes the primitive int type and avoids autoboxing and other overhead associated with the Integer class.

Summary

Public constructors

Public methods
Unit
set(object: T, value: Int!)

abstract Unit
setValue(object: T, value: Int)

A type-specific variant of set(java.lang.Object,java.lang.Integer) that is faster when dealing with fields of type int.

Inherited functions

Public constructors

IntProperty

Added in API level 24
IntProperty(name: String!)

Public methods

set

Added in API level 24
fun set(
    object: T,
    value: Int!
): Unit

setValue

Added in API level 24
abstract fun setValue(
    object: T,
    value: Int
): Unit

A type-specific variant of set(java.lang.Object,java.lang.Integer) that is faster when dealing with fields of type int.