Udostępnij za pośrednictwem


ValueAnimator.OfFloat(Single[]) Method

Definition

Constructs and returns a ValueAnimator that animates between float values.

[Android.Runtime.Register("ofFloat", "([F)Landroid/animation/ValueAnimator;", "")]
public static Android.Animation.ValueAnimator? OfFloat (params float[]? values);
[<Android.Runtime.Register("ofFloat", "([F)Landroid/animation/ValueAnimator;", "")>]
static member OfFloat : single[] -> Android.Animation.ValueAnimator

Parameters

values
Single[]

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

Returns

A ValueAnimator object that is set up to animate between the given values.

Attributes

Remarks

Constructs and returns a ValueAnimator that animates between float values. A single value implies that that value is the one being animated to. However, this is not typically useful in a ValueAnimator object because there is no way for the object to determine the starting value for the animation (unlike ObjectAnimator, which can derive that value from the target object and property being animated). Therefore, there should typically be two or more values.

Java documentation for android.animation.ValueAnimator.ofFloat(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