Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Methods](https://developer.android.com/reference/android/animation/TypeEvaluator#pubmethods)

# TypeEvaluator

*** ** * ** ***


`
public


interface
TypeEvaluator
`


`


`

|---|
| android.animation.TypeEvaluator\<T\> |

|---|
| Known indirect subclasses [ArgbEvaluator](https://developer.android.com/reference/android/animation/ArgbEvaluator), [FloatArrayEvaluator](https://developer.android.com/reference/android/animation/FloatArrayEvaluator), [FloatEvaluator](https://developer.android.com/reference/android/animation/FloatEvaluator), [IntArrayEvaluator](https://developer.android.com/reference/android/animation/IntArrayEvaluator), [IntEvaluator](https://developer.android.com/reference/android/animation/IntEvaluator), [PointFEvaluator](https://developer.android.com/reference/android/animation/PointFEvaluator), [RectEvaluator](https://developer.android.com/reference/android/animation/RectEvaluator) |---|---| | [ArgbEvaluator](https://developer.android.com/reference/android/animation/ArgbEvaluator) | This evaluator can be used to perform type interpolation between integer values that represent ARGB colors. | | [FloatArrayEvaluator](https://developer.android.com/reference/android/animation/FloatArrayEvaluator) | This evaluator can be used to perform type interpolation between `float[]` values. | | [FloatEvaluator](https://developer.android.com/reference/android/animation/FloatEvaluator) | This evaluator can be used to perform type interpolation between `float` values. | | [IntArrayEvaluator](https://developer.android.com/reference/android/animation/IntArrayEvaluator) | This evaluator can be used to perform type interpolation between `int[]` values. | | [IntEvaluator](https://developer.android.com/reference/android/animation/IntEvaluator) | This evaluator can be used to perform type interpolation between `int` values. | | [PointFEvaluator](https://developer.android.com/reference/android/animation/PointFEvaluator) | This evaluator can be used to perform type interpolation between `PointF` values. | | [RectEvaluator](https://developer.android.com/reference/android/animation/RectEvaluator) | This evaluator can be used to perform type interpolation between `Rect` values. | |

<br />

*** ** * ** ***

Interface for use with the `https://developer.android.com/reference/android/animation/ValueAnimator#setEvaluator(android.animation.TypeEvaluator)` function. Evaluators
allow developers to create animations on arbitrary property types, by allowing them to supply
custom evaluators for types that are not automatically understood and used by the animation
system.
**See also:**

- `https://developer.android.com/reference/android/animation/ValueAnimator#setEvaluator(android.animation.TypeEvaluator)`

## Summary

| ### Public methods ||
|---|---|
| ` abstract T` | ` https://developer.android.com/reference/android/animation/TypeEvaluator#evaluate(float,%20T,%20T)(float fraction, T startValue, T endValue) ` This function returns the result of linearly interpolating the start and end values, with `fraction` representing the proportion between the start and end values. |

## Public methods

### evaluate

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public abstract T evaluate (float fraction, 
                T startValue, 
                T endValue)
```

This function returns the result of linearly interpolating the start and end values, with
`fraction` representing the proportion between the start and end values. The
calculation is a simple parametric calculation: `result = x0 + t * (x1 - x0)`,
where `x0` is `startValue`, `x1` is `endValue`,
and `t` is `fraction`.

<br />

| Parameters ||
|---|---|
| `fraction` | `float`: The fraction from the starting to the ending values <br /> |
| `startValue` | `T`: The start value. <br /> |
| `endValue` | `T`: The end value. <br /> |

| Returns ||
|---|---|
| `T` | A linear interpolation between the start and end values, given the `fraction` parameter. <br /> |