# OnSwipe

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/OnSwipe.java+class:androidx.constraintlayout.motion.widget.OnSwipe) Added in [2.2.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#2.2.2)

*** ** * ** ***


```
class OnSwipe
```

<br />

*** ** * ** ***

Container for holding swipe information

## Summary

| ### Constants |
|---|---|
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe#COMPLETE_MODE_CONTINUOUS_VELOCITY() = 0` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe#COMPLETE_MODE_SPRING() = 1` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe#DRAG_ANTICLOCKWISE() = 7` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe#DRAG_CLOCKWISE() = 6` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe#DRAG_DOWN() = 1` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe#DRAG_END() = 5` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe#DRAG_LEFT() = 2` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe#DRAG_RIGHT() = 3` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe#DRAG_START() = 4` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe#DRAG_UP() = 0` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe#FLAG_DISABLE_POST_SCROLL() = 1` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe#FLAG_DISABLE_SCROLL() = 2` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe#ON_UP_AUTOCOMPLETE() = 0` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe#ON_UP_AUTOCOMPLETE_TO_END() = 2` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe#ON_UP_AUTOCOMPLETE_TO_START() = 1` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe#ON_UP_DECELERATE() = 4` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe#ON_UP_DECELERATE_AND_COMPLETE() = 5` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe#ON_UP_NEVER_TO_END() = 7` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe#ON_UP_NEVER_TO_START() = 6` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe#ON_UP_STOP() = 3` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe#SIDE_BOTTOM() = 3` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe#SIDE_END() = 6` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe#SIDE_LEFT() = 1` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe#SIDE_MIDDLE() = 4` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe#SIDE_RIGHT() = 2` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe#SIDE_START() = 5` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe#SIDE_TOP() = 0` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe#SPRING_BOUNDARY_BOUNCEBOTH() = 3` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe#SPRING_BOUNDARY_BOUNCEEND() = 2` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe#SPRING_BOUNDARY_BOUNCESTART() = 1` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe#SPRING_BOUNDARY_OVERSHOOT() = 0` |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe#OnSwipe()()` |

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe#getAutoCompleteMode()()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe#getDragDirection()()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe#getDragScale()()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe#getDragThreshold()()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe#getLimitBoundsTo()()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe#getMaxAcceleration()()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe#getMaxVelocity()()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe#getMoveWhenScrollAtTop()()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe#getNestedScrollFlags()()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe#getOnTouchUp()()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe#getRotationCenterId()()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe#getSpringBoundary()()` The behaviour at the boundaries 0 and 1 |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe#getSpringDamping()()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe#getSpringMass()()` Get the mass of the spring. the m in "a = (-k\*x-c\*v)/m" equation for the acceleration of a spring |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe#getSpringStiffness()()` get the stiffness of the spring |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe#getSpringStopThreshold()()` The threshold for spring motion to stop. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe#getTouchAnchorId()()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe#getTouchAnchorSide()()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe#getTouchRegionId()()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe#setAutoCompleteMode(int)(autoCompleteMode: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` sets the behaviour at the boundaries 0 and 1 COMPLETE_MODE_CONTINUOUS_VELOCITY = 0; COMPLETE_MODE_SPRING = 1; |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe#setDragDirection(int)(dragDirection: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` The direction of the drag. |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe#setDragScale(int)(dragScale: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Normally 1 this can be tweaked to make the acceleration faster |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe#setDragThreshold(int)(dragThreshold: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` This sets the threshold before the animation is kicked off. |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe#setLimitBoundsTo(int)(id: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Only allow touch actions to be initiated within this region |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe#setMaxAcceleration(int)(maxAcceleration: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` The maximum acceleration and deceleration of the animation (Change in Change in progress per second) Faster makes the object seem lighter and quicker |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe#setMaxVelocity(int)(maxVelocity: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` The maximum velocity (Change in progress per second) animation can achieve |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe#setMoveWhenScrollAtTop(boolean)(moveWhenScrollAtTop: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` When collaborating with a NestedScrollView do you progress form 0-1 only when the scroll view is at the top. |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe#setNestedScrollFlags(int)(flags: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Various flag to control behaviours of nested scroll FLAG_DISABLE_POST_SCROLL = 1; FLAG_DISABLE_SCROLL = 2; |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe#setOnTouchUp(int)(mode: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Configures what happens when the user releases on mouse up. |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe#setRotateCenter(int)(rotationCenterId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` The view to center the rotation about |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe#setSpringBoundary(int)(springBoundary: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` The behaviour at the boundaries 0 and 1. |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe#setSpringDamping(float)(springDamping: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` Set the damping of the spring if using spring. c in "a = (-k\*x-c\*v)/m" equation for the acceleration of a spring |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe#setSpringMass(float)(springMass: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` Set the Mass of the spring if using spring. m in "a = (-k\*x-c\*v)/m" equation for the acceleration of a spring |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe#setSpringStiffness(float)(springStiffness: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` set the stiffness of the spring if using spring. |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe#setSpringStopThreshold(float)(springStopThreshold: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` set the threshold for spring motion to stop. |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe#setTouchAnchorId(int)(side: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` The id of the view who's movement is matched to your drag If not specified it will map to a linear movement across the width of the motionLayout |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe#setTouchAnchorSide(int)(side: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` This side of the view that matches the drag movement. |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe#setTouchRegionId(int)(side: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` |

## Constants

### COMPLETE_MODE_CONTINUOUS_VELOCITY

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

```
const val COMPLETE_MODE_CONTINUOUS_VELOCITY = 0: Int
```

### COMPLETE_MODE_SPRING

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

```
const val COMPLETE_MODE_SPRING = 1: Int
```

### DRAG_ANTICLOCKWISE

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

```
const val DRAG_ANTICLOCKWISE = 7: Int
```

### DRAG_CLOCKWISE

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

```
const val DRAG_CLOCKWISE = 6: Int
```

### DRAG_DOWN

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

```
const val DRAG_DOWN = 1: Int
```

### DRAG_END

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

```
const val DRAG_END = 5: Int
```

### DRAG_LEFT

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

```
const val DRAG_LEFT = 2: Int
```

### DRAG_RIGHT

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

```
const val DRAG_RIGHT = 3: Int
```

### DRAG_START

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

```
const val DRAG_START = 4: Int
```

### DRAG_UP

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

```
const val DRAG_UP = 0: Int
```

### FLAG_DISABLE_POST_SCROLL

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

```
const val FLAG_DISABLE_POST_SCROLL = 1: Int
```

### FLAG_DISABLE_SCROLL

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

```
const val FLAG_DISABLE_SCROLL = 2: Int
```

### ON_UP_AUTOCOMPLETE

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

```
const val ON_UP_AUTOCOMPLETE = 0: Int
```

### ON_UP_AUTOCOMPLETE_TO_END

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

```
const val ON_UP_AUTOCOMPLETE_TO_END = 2: Int
```

### ON_UP_AUTOCOMPLETE_TO_START

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

```
const val ON_UP_AUTOCOMPLETE_TO_START = 1: Int
```

### ON_UP_DECELERATE

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

```
const val ON_UP_DECELERATE = 4: Int
```

### ON_UP_DECELERATE_AND_COMPLETE

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

```
const val ON_UP_DECELERATE_AND_COMPLETE = 5: Int
```

### ON_UP_NEVER_TO_END

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

```
const val ON_UP_NEVER_TO_END = 7: Int
```

### ON_UP_NEVER_TO_START

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

```
const val ON_UP_NEVER_TO_START = 6: Int
```

### ON_UP_STOP

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

```
const val ON_UP_STOP = 3: Int
```

### SIDE_BOTTOM

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

```
const val SIDE_BOTTOM = 3: Int
```

### SIDE_END

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

```
const val SIDE_END = 6: Int
```

### SIDE_LEFT

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

```
const val SIDE_LEFT = 1: Int
```

### SIDE_MIDDLE

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

```
const val SIDE_MIDDLE = 4: Int
```

### SIDE_RIGHT

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

```
const val SIDE_RIGHT = 2: Int
```

### SIDE_START

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

```
const val SIDE_START = 5: Int
```

### SIDE_TOP

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

```
const val SIDE_TOP = 0: Int
```

### SPRING_BOUNDARY_BOUNCEBOTH

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

```
const val SPRING_BOUNDARY_BOUNCEBOTH = 3: Int
```

### SPRING_BOUNDARY_BOUNCEEND

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

```
const val SPRING_BOUNDARY_BOUNCEEND = 2: Int
```

### SPRING_BOUNDARY_BOUNCESTART

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

```
const val SPRING_BOUNDARY_BOUNCESTART = 1: Int
```

### SPRING_BOUNDARY_OVERSHOOT

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

```
const val SPRING_BOUNDARY_OVERSHOOT = 0: Int
```

## Public constructors

### OnSwipe

Added in 2.2.2

```
OnSwipe()
```

## Public functions

### getAutoCompleteMode

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

```
fun getAutoCompleteMode(): Int
```

### getDragDirection

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

```
fun getDragDirection(): Int
```

### getDragScale

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

```
fun getDragScale(): Float
```

### getDragThreshold

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

```
fun getDragThreshold(): Float
```

### getLimitBoundsTo

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

```
fun getLimitBoundsTo(): Int
```

### getMaxAcceleration

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

```
fun getMaxAcceleration(): Float
```

### getMaxVelocity

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

```
fun getMaxVelocity(): Float
```

### getMoveWhenScrollAtTop

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

```
fun getMoveWhenScrollAtTop(): Boolean
```

### getNestedScrollFlags

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

```
fun getNestedScrollFlags(): Int
```

### getOnTouchUp

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

```
fun getOnTouchUp(): Int
```

### getRotationCenterId

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

```
fun getRotationCenterId(): Int
```

### getSpringBoundary

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

```
fun getSpringBoundary(): Int
```

The behaviour at the boundaries 0 and 1

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

### getSpringDamping

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

```
fun getSpringDamping(): Float
```

### getSpringMass

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

```
fun getSpringMass(): Float
```

Get the mass of the spring. the m in "a = (-k\*x-c\*v)/m" equation for the acceleration of a spring

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

### getSpringStiffness

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

```
fun getSpringStiffness(): Float
```

get the stiffness of the spring

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

### getSpringStopThreshold

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

```
fun getSpringStopThreshold(): Float
```

The threshold for spring motion to stop.

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

### getTouchAnchorId

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

```
fun getTouchAnchorId(): Int
```

### getTouchAnchorSide

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

```
fun getTouchAnchorSide(): Int
```

### getTouchRegionId

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

```
fun getTouchRegionId(): Int
```

### setAutoCompleteMode

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

```
fun setAutoCompleteMode(autoCompleteMode: Int): Unit
```

sets the behaviour at the boundaries 0 and 1 COMPLETE_MODE_CONTINUOUS_VELOCITY = 0; COMPLETE_MODE_SPRING = 1;

### setDragDirection

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

```
fun setDragDirection(dragDirection: Int): OnSwipe!
```

The direction of the drag.

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

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe!` |   |

### setDragScale

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

```
fun setDragScale(dragScale: Int): OnSwipe!
```

Normally 1 this can be tweaked to make the acceleration faster

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

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe!` |   |

### setDragThreshold

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

```
fun setDragThreshold(dragThreshold: Int): OnSwipe!
```

This sets the threshold before the animation is kicked off. It is important when have multi state animations the have some play before the System decides which animation to jump on.

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

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe!` |   |

### setLimitBoundsTo

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

```
fun setLimitBoundsTo(id: Int): OnSwipe!
```

Only allow touch actions to be initiated within this region

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

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe!` |   |

### setMaxAcceleration

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

```
fun setMaxAcceleration(maxAcceleration: Int): OnSwipe!
```

The maximum acceleration and deceleration of the animation (Change in Change in progress per second) Faster makes the object seem lighter and quicker

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

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe!` |   |

### setMaxVelocity

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

```
fun setMaxVelocity(maxVelocity: Int): OnSwipe!
```

The maximum velocity (Change in progress per second) animation can achieve

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

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe!` |   |

### setMoveWhenScrollAtTop

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

```
fun setMoveWhenScrollAtTop(moveWhenScrollAtTop: Boolean): OnSwipe!
```

When collaborating with a NestedScrollView do you progress form 0-1 only when the scroll view is at the top.

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

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe!` |   |

### setNestedScrollFlags

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

```
fun setNestedScrollFlags(flags: Int): OnSwipe!
```

Various flag to control behaviours of nested scroll FLAG_DISABLE_POST_SCROLL = 1; FLAG_DISABLE_SCROLL = 2;

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

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe!` |   |

### setOnTouchUp

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

```
fun setOnTouchUp(mode: Int): OnSwipe!
```

Configures what happens when the user releases on mouse up. One of: ON_UP_AUTOCOMPLETE, ON_UP_AUTOCOMPLETE_TO_START, ON_UP_AUTOCOMPLETE_TO_END, ON_UP_STOP, ON_UP_DECELERATE, ON_UP_DECELERATE_AND_COMPLETE

| Parameters |
|---|---|
| `mode: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | default = ON_UP_AUTOCOMPLETE |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe!` |   |

### setRotateCenter

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

```
fun setRotateCenter(rotationCenterId: Int): OnSwipe!
```

The view to center the rotation about

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

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe!` | this |

### setSpringBoundary

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

```
fun setSpringBoundary(springBoundary: Int): OnSwipe!
```

The behaviour at the boundaries 0 and 1. SPRING_BOUNDARY_OVERSHOOT = 0; SPRING_BOUNDARY_BOUNCE_START = 1; SPRING_BOUNDARY_BOUNCE_END = 2; SPRING_BOUNDARY_BOUNCE_BOTH = 3;

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

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe!` |   |

### setSpringDamping

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

```
fun setSpringDamping(springDamping: Float): OnSwipe!
```

Set the damping of the spring if using spring. c in "a = (-k\*x-c\*v)/m" equation for the acceleration of a spring

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

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe!` | this |

### setSpringMass

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

```
fun setSpringMass(springMass: Float): OnSwipe!
```

Set the Mass of the spring if using spring. m in "a = (-k\*x-c\*v)/m" equation for the acceleration of a spring

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

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe!` | this |

### setSpringStiffness

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

```
fun setSpringStiffness(springStiffness: Float): OnSwipe!
```

set the stiffness of the spring if using spring. If this is set the swipe will use a spring return system. If set to NaN it will revert to the norm system. K in "a = (-k\*x-c\*v)/m" equation for the acceleration of a spring

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

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe!` |   |

### setSpringStopThreshold

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

```
fun setSpringStopThreshold(springStopThreshold: Float): OnSwipe!
```

set the threshold for spring motion to stop. This is in change in progress / second If the spring will never go above that threshold again it will stop.

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

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe!` |   |

### setTouchAnchorId

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

```
fun setTouchAnchorId(side: Int): OnSwipe!
```

The id of the view who's movement is matched to your drag If not specified it will map to a linear movement across the width of the motionLayout

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

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe!` |   |

### setTouchAnchorSide

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

```
fun setTouchAnchorSide(side: Int): OnSwipe!
```

This side of the view that matches the drag movement. Only meaning full if the object changes size during the movement. (rotation is not considered)

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

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe!` |   |

### setTouchRegionId

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

```
fun setTouchRegionId(side: Int): OnSwipe!
```

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

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/motion/widget/OnSwipe!` |   |