FloatPropertyCompat

public abstract class FloatPropertyCompat
extends Object

java.lang.Object
   ↳ androidx.dynamicanimation.animation.FloatPropertyCompat<T>


FloatPropertyCompat is an abstraction that can be used to represent a mutable float value that is held in a host object. To access this float value, setValue(Object, float) and getter getValue(Object) need to be implemented. Both the setter and the getter take the primitive float type and avoids autoboxing and other overhead associated with the Float class.

For API 24 and later, FloatProperty instances can be converted to FloatPropertyCompat through createFloatPropertyCompat(FloatProperty).

Summary

Public constructors

FloatPropertyCompat(String name)

A constructor that takes an identifying name.

Public methods

static <T> FloatPropertyCompat<T> createFloatPropertyCompat(FloatProperty<T> property)

Create a FloatPropertyCompat wrapper for a FloatProperty object.

abstract float getValue(T object)

Returns the current value that this property represents on the given object.

abstract void setValue(T object, float value)

Sets the value on object which this property represents.

Inherited methods

Public constructors

FloatPropertyCompat