Udostępnij za pośrednictwem


ObjectAnimator.OfFloat Method

Definition

Overloads

OfFloat(Object, Property, Single[])

Constructs and returns an ObjectAnimator that animates between float values.

OfFloat(Object, String, Single[])

Constructs and returns an ObjectAnimator that animates between float values.

OfFloat(Object, Property, Property, Path)

Constructs and returns an ObjectAnimator that animates coordinates along a Path using two properties.

OfFloat(Object, String, String, Path)

Constructs and returns an ObjectAnimator that animates coordinates along a Path using two properties.

OfFloat(Object, Property, Single[])

Constructs and returns an ObjectAnimator that animates between float values.

[Android.Runtime.Register("ofFloat", "(Ljava/lang/Object;Landroid/util/Property;[F)Landroid/animation/ObjectAnimator;", "")]
[Java.Interop.JavaTypeParameters(new System.String[] { "T" })]
public static Android.Animation.ObjectAnimator? OfFloat (Java.Lang.Object? target, Android.Util.Property? property, params float[]? values);
[<Android.Runtime.Register("ofFloat", "(Ljava/lang/Object;Landroid/util/Property;[F)Landroid/animation/ObjectAnimator;", "")>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "T" })>]
static member OfFloat : Java.Lang.Object * Android.Util.Property * single[] -> Android.Animation.ObjectAnimator

Parameters

target
Object

The object whose property is to be animated.

property
Property

The property being animated.

values
Single[]

A set of values that the animation will animate between over time.

Returns

An ObjectAnimator object that is set up to animate between the given values.

Attributes

Remarks

Constructs and returns an ObjectAnimator that animates between float values. A single value implies that that value is the one being animated to, in which case the start value will be derived from the property being animated and the target object when #start() is called for the first time. Two values imply starting and ending values. More than two values imply a starting value, values to animate through along the way, and an ending value (these values will be distributed evenly across the duration of the animation).

Java documentation for android.animation.ObjectAnimator.ofFloat(T, android.util.Property<T, java.lang.Float>, float...).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

OfFloat(Object, String, Single[])

Constructs and returns an ObjectAnimator that animates between float values.

[Android.Runtime.Register("ofFloat", "(Ljava/lang/Object;Ljava/lang/String;[F)Landroid/animation/ObjectAnimator;", "")]
public static Android.Animation.ObjectAnimator? OfFloat (Java.Lang.Object? target, string? propertyName, params float[]? values);
[<Android.Runtime.Register("ofFloat", "(Ljava/lang/Object;Ljava/lang/String;[F)Landroid/animation/ObjectAnimator;", "")>]
static member OfFloat : Java.Lang.Object * string * single[] -> Android.Animation.ObjectAnimator

Parameters

target
Object

The object whose property is to be animated. This object should have a public method on it called setName(), where name is the value of the propertyName parameter.

propertyName
String

The name of the property being animated.

values
Single[]

A set of values that the animation will animate between over time.

Returns

An ObjectAnimator object that is set up to animate between the given values.

Attributes

Remarks

Constructs and returns an ObjectAnimator that animates between float values. A single value implies that that value is the one being animated to, in which case the start value will be derived from the property being animated and the target object when #start() is called for the first time. Two values imply starting and ending values. More than two values imply a starting value, values to animate through along the way, and an ending value (these values will be distributed evenly across the duration of the animation).

Java documentation for android.animation.ObjectAnimator.ofFloat(java.lang.Object, java.lang.String, float...).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

OfFloat(Object, Property, Property, Path)

Constructs and returns an ObjectAnimator that animates coordinates along a Path using two properties.

[Android.Runtime.Register("ofFloat", "(Ljava/lang/Object;Landroid/util/Property;Landroid/util/Property;Landroid/graphics/Path;)Landroid/animation/ObjectAnimator;", "")]
[Java.Interop.JavaTypeParameters(new System.String[] { "T" })]
public static Android.Animation.ObjectAnimator? OfFloat (Java.Lang.Object? target, Android.Util.Property? xProperty, Android.Util.Property? yProperty, Android.Graphics.Path? path);
[<Android.Runtime.Register("ofFloat", "(Ljava/lang/Object;Landroid/util/Property;Landroid/util/Property;Landroid/graphics/Path;)Landroid/animation/ObjectAnimator;", "")>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "T" })>]
static member OfFloat : Java.Lang.Object * Android.Util.Property * Android.Util.Property * Android.Graphics.Path -> Android.Animation.ObjectAnimator

Parameters

target
Object

The object whose properties are to be animated.

xProperty
Property

The property for the x coordinate being animated.

yProperty
Property

The property for the y coordinate being animated.

path
Path

The Path to animate values along.

Returns

An ObjectAnimator object that is set up to animate along path.

Attributes

Remarks

Constructs and returns an ObjectAnimator that animates coordinates along a Path using two properties. A Path</> animation moves in two dimensions, animating coordinates (x, y) together to follow the line. In this variation, the coordinates are floats that are set to separate properties, xProperty and yProperty.

Java documentation for android.animation.ObjectAnimator.ofFloat(T, android.util.Property<T, java.lang.Float>, android.util.Property<T, java.lang.Float>, android.graphics.Path).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

OfFloat(Object, String, String, Path)

Constructs and returns an ObjectAnimator that animates coordinates along a Path using two properties.

[Android.Runtime.Register("ofFloat", "(Ljava/lang/Object;Ljava/lang/String;Ljava/lang/String;Landroid/graphics/Path;)Landroid/animation/ObjectAnimator;", "")]
public static Android.Animation.ObjectAnimator? OfFloat (Java.Lang.Object? target, string? xPropertyName, string? yPropertyName, Android.Graphics.Path? path);
[<Android.Runtime.Register("ofFloat", "(Ljava/lang/Object;Ljava/lang/String;Ljava/lang/String;Landroid/graphics/Path;)Landroid/animation/ObjectAnimator;", "")>]
static member OfFloat : Java.Lang.Object * string * string * Android.Graphics.Path -> Android.Animation.ObjectAnimator

Parameters

target
Object

The object whose properties are to be animated. This object should have public methods on it called setNameX() and setNameY, where nameX and nameY are the value of the xPropertyName and yPropertyName parameters, respectively.

xPropertyName
String

The name of the property for the x coordinate being animated.

yPropertyName
String

The name of the property for the y coordinate being animated.

path
Path

The Path to animate values along.

Returns

An ObjectAnimator object that is set up to animate along path.

Attributes

Remarks

Constructs and returns an ObjectAnimator that animates coordinates along a Path using two properties. A Path</> animation moves in two dimensions, animating coordinates (x, y) together to follow the line. In this variation, the coordinates are floats that are set to separate properties designated by xPropertyName and yPropertyName.

Java documentation for android.animation.ObjectAnimator.ofFloat(java.lang.Object, java.lang.String, java.lang.String, android.graphics.Path).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to