# Animatable

Artifact: [androidx.constraintlayout:constraintlayout](https://developer.android.com/jetpack/androidx/releases/constraintlayout) [View Source](https://cs.android.com/search?q=file:androidx/constraintlayout/motion/widget/Animatable.java+class:androidx.constraintlayout.motion.widget.Animatable) Added in [2.2.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#2.2.2)

*** ** * ** ***


```
interface Animatable
```

<br />

Known direct subclasses [MotionHelperInterface](https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/MotionHelperInterface)

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/MotionHelperInterface` | This defined the interface for MotionLayout helpers Helpers can be used to draw motion effects or modify motions |

Known indirect subclasses [Carousel](https://developer.android.com/reference/kotlin/androidx/constraintlayout/helper/widget/Carousel), [MotionEffect](https://developer.android.com/reference/kotlin/androidx/constraintlayout/helper/widget/MotionEffect), [MotionHelper](https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/MotionHelper)

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/helper/widget/Carousel` | Carousel works within a MotionLayout to provide a simple recycler like pattern. |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/helper/widget/MotionEffect` | MotionHelper that automatically inserts keyframes for views moving in a given direction, out of: |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/MotionHelper` |   |

*** ** * ** ***

A helper interface allowing MotionLayout to directly drive custom views

## Summary

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/Animatable#getProgress()()` get the progress |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/Animatable#setProgress(float)(progress: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` Set the progress |

## Public functions

### getProgress

Added in [2.2.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#2.2.2)

```
fun getProgress(): Float
```

get the progress

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` |   |

### setProgress

Added in [2.2.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#2.2.2)

```
fun setProgress(progress: Float): Unit
```

Set the progress

| Parameters |
|---|---|
| `progress: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` |   |