# BrushPaint.AnimationRepeatMode

Artifact: [androidx.ink:ink-brush](https://developer.android.com/jetpack/androidx/releases/ink) [View Source](https://cs.android.com/search?q=file:androidx/ink/brush/BrushPaint.kt+class:androidx.ink.brush.BrushPaint.AnimationRepeatMode) Added in [1.1.0-alpha11](https://developer.android.com/jetpack/androidx/releases/ink#1.1.0-alpha11)

*** ** * ** ***


```
public final class BrushPaint.AnimationRepeatMode
```

<br />

*** ** * ** ***

Specifies what should happen when a brush paint animation repeats.

## Summary

| ### Public fields |
|---|---|
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/ink/brush/BrushPaint.AnimationRepeatMode` | `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.AnimationRepeatMode#RESTART()` Return to the start of the animation for the next repetition. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/ink/brush/BrushPaint.AnimationRepeatMode` | `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.AnimationRepeatMode#REVERSE()` Reverse animation direction for the next repetition. |

| ### Public methods |
|---|---|
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/ink/brush/Version` | `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.AnimationRepeatMode#calculateMinimumRequiredVersion()()` Returns the minimum required `https://developer.android.com/reference/androidx/ink/brush/Version` for this `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.AnimationRepeatMode`. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.AnimationRepeatMode#toString()()` |

## Public fields

### RESTART

```
public static final @NonNull BrushPaint.AnimationRepeatMode RESTART
```

Return to the start of the animation for the next repetition.

### REVERSE

```
public static final @NonNull BrushPaint.AnimationRepeatMode REVERSE
```

Reverse animation direction for the next repetition.

## Public methods

### calculateMinimumRequiredVersion

Added in [1.1.0-alpha11](https://developer.android.com/jetpack/androidx/releases/ink#1.1.0-alpha11)

```
public final @NonNull Version calculateMinimumRequiredVersion()
```

Returns the minimum required `https://developer.android.com/reference/androidx/ink/brush/Version` for this `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.AnimationRepeatMode`.

By default, decoding a `https://developer.android.com/reference/androidx/ink/brush/BrushFamily` containing an `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.AnimationRepeatMode` with a minimum required version higher than `https://developer.android.com/reference/androidx/ink/brush/Version#MAX_SUPPORTED()` will fail.

### toString

```
public @NonNull String toString()
```