Added in API level 24

FloatProperty


abstract class FloatProperty<T : Any!> : Property<T, Float!>
kotlin.Any
   ↳ android.util.Property<T, kotlin.Float>
   ↳ android.util.FloatProperty

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

Summary

Public constructors

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

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

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

Inherited functions

Public constructors

FloatProperty

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

Public methods

set

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

setValue

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

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