FloatProperty
public
abstract
class
FloatProperty
extends Property<T, Float>
java.lang.Object | ||
↳ | android.util.Property<T, java.lang.Float> | |
↳ | androidx.core.animation.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)
A constructor that takes an identifying name for the float property. |
|
FloatProperty()
A constructor that creates a float property instance with an empty name. |
Public methods | |
---|---|
final
void
|
set(T object, Float value)
|
abstract
void
|
setValue(T object, float value)
A type-specific variant of |
Inherited methods | |
---|---|
Public constructors
FloatProperty
public FloatProperty (String name)
A constructor that takes an identifying name for the float property. This name
will show up as a part of ObjectAnimator.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 | |
---|---|
name |
String : name to be used to identify the property |
See also:
FloatProperty
public FloatProperty ()
A constructor that creates a float property instance with an empty name. To create a named
float property, see FloatProperty(String)
See also:
Public methods
set
public final void set (T object, Float value)
Parameters | |
---|---|
object |
T |
value |
Float |
setValue
public 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
.
Parameters | |
---|---|
object |
T |
value |
float |