belongs to Maven artifact com.android.support:support-dynamic-animation:28.0.0-alpha1
FloatPropertyCompat
public
abstract
class
FloatPropertyCompat
extends Object
| java.lang.Object | |
| ↳ | android.support.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 |
abstract
float
|
getValue(T object)
Returns the current value that this property represents on the given |
abstract
void
|
setValue(T object, float value)
Sets the value on |
Inherited methods | |
|---|---|
java.lang.Object
| |
Public constructors
FloatPropertyCompat
FloatPropertyCompat (String name)
A constructor that takes an identifying name.
| Parameters | |
|---|---|
name |
String |
Public methods
createFloatPropertyCompat
FloatPropertyCompat<T> createFloatPropertyCompat (FloatProperty<T> property)
Create a FloatPropertyCompat wrapper for a FloatProperty object. The new
FloatPropertyCompat instance will access and modify the property value of
FloatProperty through the FloatProperty instance's setter and getter.
| Parameters | |
|---|---|
property |
FloatProperty: FloatProperty instance to be wrapped |
| Returns | |
|---|---|
FloatPropertyCompat<T> |
a new FloatPropertyCompat wrapper for the given FloatProperty object
|
getValue
float getValue (T object)
Returns the current value that this property represents on the given object.
| Parameters | |
|---|---|
object |
T: object which this property represents |
| Returns | |
|---|---|
float |
the current property value of the given object |
setValue
void setValue (T object,
float value)Sets the value on object which this property represents.
| Parameters | |
|---|---|
object |
T: object which this property represents |
value |
float: new value of the property
|