FloatProperty

public abstract class FloatProperty<T> extends Property


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.

Parameters
<T>

The class on which the Property is declared.

Summary

Public constructors

A constructor that creates a float property instance with an empty name.

A constructor that takes an identifying name for the float property.

Public methods

final void
set(@NonNull T object, @NonNull Float value)
abstract void
setValue(@NonNull T object, float value)

A type-specific variant of set that is faster when dealing with fields of type float.

Inherited methods

From android.util.Property
abstract V
get(T p)
String
Class<V>
boolean
static Property<T, V>
<T, V> of(Class<T> hostType, Class<V> valueType, String name)

Public constructors

FloatProperty

public FloatProperty()

A constructor that creates a float property instance with an empty name. To create a named float property, see FloatProperty

See also
FloatProperty

FloatProperty

public FloatProperty(@NonNull String name)

A constructor that takes an identifying name for the float property. This name will show up as a part of getPropertyName when the ObjectAnimator is created with a Property instance as the animation property. This name will also appear in systrace as a part of the animator name.

Parameters
@NonNull String name

name to be used to identify the property

See also
FloatProperty

Public methods

set

public final void set(@NonNull T object, @NonNull Float value)

setValue

public abstract void setValue(@NonNull T object, float value)

A type-specific variant of set that is faster when dealing with fields of type float.