# RepeatMode

Artifact: [androidx.compose.animation:animation-core](https://developer.android.com/jetpack/androidx/releases/compose-animation) [View Source](https://cs.android.com/search?q=file:androidx/compose/animation/core/AnimationSpec.kt+class:androidx.compose.animation.core.RepeatMode) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-animation#1.0.0) Common/All
- Cmn

  ```
  enum RepeatMode : Enum<RepeatMode>
  ```

|---|---|---|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html) |||
| ↳ | [kotlin.Enum](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-enum/index.html)\<[RepeatMode](https://developer.android.com/reference/kotlin/androidx/compose/animation/core/RepeatMode)\> ||
|   | ↳ | [androidx.compose.animation.core.RepeatMode](https://developer.android.com/reference/kotlin/androidx/compose/animation/core/RepeatMode) |

*** ** * ** ***

Repeat mode for `https://developer.android.com/reference/kotlin/androidx/compose/animation/core/RepeatableSpec` and `https://developer.android.com/reference/kotlin/androidx/compose/animation/core/VectorizedRepeatableSpec`.

## Summary

| ### Enum Values |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/animation/core/RepeatMode#Restart` | `https://developer.android.com/reference/kotlin/androidx/compose/animation/core/RepeatMode#Restart` will restart the animation and animate from the start value to the end value. |
| `https://developer.android.com/reference/kotlin/androidx/compose/animation/core/RepeatMode#Reverse` | `https://developer.android.com/reference/kotlin/androidx/compose/animation/core/RepeatMode#Reverse` will reverse the last iteration as the animation repeats. |

| ### Public functions |
|---|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/animation/core/RepeatMode` | `https://developer.android.com/reference/kotlin/androidx/compose/animation/core/RepeatMode#valueOf(kotlin.String)(value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)` Returns the enum constant of this type with the specified name. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://developer.android.com/reference/kotlin/androidx/compose/animation/core/RepeatMode>` | `https://developer.android.com/reference/kotlin/androidx/compose/animation/core/RepeatMode#values()()` Returns an array containing the constants of this enum type, in the order they're declared. | Cmn |

| ### Public properties |
|---|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.enums/-enum-entries/index.html<https://developer.android.com/reference/kotlin/androidx/compose/animation/core/RepeatMode>` | `https://developer.android.com/reference/kotlin/androidx/compose/animation/core/RepeatMode#entries()` Returns an immutable `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.enums/-enum-entries/index.html` list containing the constants of this enum type, in the order they're declared. | Cmn |

## Enum Values

### Restart

```
val RepeatMode.Restart: RepeatMode
```

`https://developer.android.com/reference/kotlin/androidx/compose/animation/core/RepeatMode#Restart` will restart the animation and animate from the start value to the end value.

### Reverse

```
val RepeatMode.Reverse: RepeatMode
```

`https://developer.android.com/reference/kotlin/androidx/compose/animation/core/RepeatMode#Reverse` will reverse the last iteration as the animation repeats.

## Public functions

### valueOf

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-animation#1.0.0)

```
fun valueOf(value: String): RepeatMode
```

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html` | if this enum type has no constant with the specified name |

### values

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-animation#1.0.0)

```
fun values(): Array<RepeatMode>
```

Returns an array containing the constants of this enum type, in the order they're declared.

This method may be used to iterate over the constants.

The function returns a new instance of the array on every call. The array could be mutated, so working with it may also require defensive copying. Consider using `entries` property as a more efficient alternative returning an immutable list of enum entries.

## Public properties

### entries

Cmn

```
val entries: EnumEntries<RepeatMode>
```

Returns an immutable `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.enums/-enum-entries/index.html` list containing the constants of this enum type, in the order they're declared.