Udostępnij za pośrednictwem


ValueAnimator.SetEvaluator(ITypeEvaluator) Method

Definition

The type evaluator to be used when calculating the animated values of this animation.

[Android.Runtime.Register("setEvaluator", "(Landroid/animation/TypeEvaluator;)V", "GetSetEvaluator_Landroid_animation_TypeEvaluator_Handler")]
public virtual void SetEvaluator (Android.Animation.ITypeEvaluator? value);
[<Android.Runtime.Register("setEvaluator", "(Landroid/animation/TypeEvaluator;)V", "GetSetEvaluator_Landroid_animation_TypeEvaluator_Handler")>]
abstract member SetEvaluator : Android.Animation.ITypeEvaluator -> unit
override this.SetEvaluator : Android.Animation.ITypeEvaluator -> unit

Parameters

value
ITypeEvaluator

the evaluator to be used this animation

Attributes

Remarks

The type evaluator to be used when calculating the animated values of this animation. The system will automatically assign a float or int evaluator based on the type of startValue and endValue in the constructor. But if these values are not one of these primitive types, or if different evaluation is desired (such as is necessary with int values that represent colors), a custom evaluator needs to be assigned. For example, when running an animation on color values, the ArgbEvaluator should be used to get correct RGB color interpolation.

If this ValueAnimator has only one set of values being animated between, this evaluator will be used for that set. If there are several sets of values being animated, which is the case if PropertyValuesHolder objects were set on the ValueAnimator, then the evaluator is assigned just to the first PropertyValuesHolder object.

Java documentation for android.animation.ValueAnimator.setEvaluator(android.animation.TypeEvaluator).

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