# SpringStopEngine

Artifact: [androidx.constraintlayout:constraintlayout-core](https://developer.android.com/jetpack/androidx/releases/constraintlayout) [View Source](https://cs.android.com/search?q=file:androidx/constraintlayout/core/motion/utils/SpringStopEngine.java+class:androidx.constraintlayout.core.motion.utils.SpringStopEngine) Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

*** ** * ** ***


```
public class SpringStopEngine implements StopEngine
```

<br />

*** ** * ** ***

This contains the class to provide the logic for an animation to come to a stop using a spring model.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/constraintlayout/core/motion/utils/SpringStopEngine#SpringStopEngine()()` |

| ### Public methods |
|---|---|
| `https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/constraintlayout/core/motion/utils/SpringStopEngine#debug(java.lang.String,float)(https://developer.android.com/reference/java/lang/String.html desc, float time)` |
| `float` | `https://developer.android.com/reference/androidx/constraintlayout/core/motion/utils/SpringStopEngine#getAcceleration()()` |
| `float` | `https://developer.android.com/reference/androidx/constraintlayout/core/motion/utils/SpringStopEngine#getInterpolation(float)(float time)` |
| `float` | `https://developer.android.com/reference/androidx/constraintlayout/core/motion/utils/SpringStopEngine#getVelocity()()` |
| `float` | `https://developer.android.com/reference/androidx/constraintlayout/core/motion/utils/SpringStopEngine#getVelocity(float)(float time)` |
| `boolean` | `https://developer.android.com/reference/androidx/constraintlayout/core/motion/utils/SpringStopEngine#isStopped()()` |
| `void` | `https://developer.android.com/reference/androidx/constraintlayout/core/motion/utils/SpringStopEngine#springConfig(float,float,float,float,float,float,float,int)( float currentPos, float target, float currentVelocity, float mass, float stiffness, float damping, float stopThreshold, int boundaryMode )` |

## Public constructors

### SpringStopEngine

Added in 1.1.2

```
public SpringStopEngine()
```

## Public methods

### debug

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

```
public String debug(String desc, float time)
```

### getAcceleration

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

```
public float getAcceleration()
```

### getInterpolation

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

```
public float getInterpolation(float time)
```

### getVelocity

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

```
public float getVelocity()
```

### getVelocity

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

```
public float getVelocity(float time)
```

### isStopped

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

```
public boolean isStopped()
```

### springConfig

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

```
public void springConfig(
    float currentPos,
    float target,
    float currentVelocity,
    float mass,
    float stiffness,
    float damping,
    float stopThreshold,
    int boundaryMode
)
```