Skip to content

Most visited

Recently visited

navigation
Added in API level 24

FloatProperty

public abstract class FloatProperty
extends Property<T, Float>

java.lang.Object
   ↳ android.util.Property<T, java.lang.Float>
     ↳ android.util.FloatProperty<T>


An implementation of 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

FloatProperty(String name)

Public methods

final void set(T object, Float value)

Sets the value on object which this property represents.

abstract void setValue(T object, float value)

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

Inherited methods

From class android.util.Property
From class java.lang.Object

Public constructors

FloatProperty

Added in API level 24
FloatProperty (String name)

Parameters
name String

Public methods

set

Added in API level 24
void set (T object, 
                Float value)

Sets the value on object which this property represents. If the method is unable to set the value on the target object it will throw an UnsupportedOperationException exception.

Parameters
object T
value Float

setValue

Added in API level 24
void setValue (T object, 
                float value)

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

Parameters
object T
value float
This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.