# ConstraintProperties

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

*** ** * ** ***


```
class ConstraintProperties
```

<br />

*** ** * ** ***

**Added in 2.0**

ConstraintProperties provides an easy to use api to update the layout params of `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintLayout` children

## Summary

| ### Constants |
|---|---|
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties#BASELINE() = 5` The baseline of the text in a view. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties#BOTTOM() = 4` The bottom side of a view. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties#END() = 7` The right side of a view in left to right languages. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties#LEFT() = 1` The left side of a view. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties#MATCH_CONSTRAINT() = 0` Dimension will be controlled by constraints |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties#MATCH_CONSTRAINT_SPREAD() = 0` Calculate the size of a view in 0 dp by reducing the constrains gaps as much as possible |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties#MATCH_CONSTRAINT_WRAP() = 1` How to calculate the size of a view in 0 dp by using its wrap_content size |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties#PARENT_ID() = 0` References the id of the parent. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties#RIGHT() = 2` The right side of a view. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties#START() = 6` The left side of a view in left to right languages. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties#TOP() = 3` The top of a view. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties#UNSET() = -1` Used to indicate a parameter is cleared or not set |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties#WRAP_CONTENT() = -2` Dimension will set by the view's content |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties#ConstraintProperties(android.view.View)(view: https://developer.android.com/reference/android/view/View.html!)` |

| ### Public functions |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties#addToHorizontalChain(int,int)(leftId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, rightId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Adds the view to a horizontal chain. |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties#addToHorizontalChainRTL(int,int)(leftId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, rightId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Adds the view to a horizontal chain using RTL attributes. |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties#addToVerticalChain(int,int)(topId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, bottomId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Adds a view to a vertical chain. |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties#alpha(float)(alpha: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` Adjust the alpha of a view. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties#apply()()` Should be called to apply the changes currently a no op in place for subclasses and future use |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties#center(int,int,int,int,int,int,float)( firstID: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, firstSide: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, firstMargin: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, secondId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, secondSide: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, secondMargin: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, bias: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html )` Center view between the other two widgets. |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties#centerHorizontally(int)(toView: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Centers the view horizontally relative to toView's position. |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties#centerHorizontally(int,int,int,int,int,int,float)( leftId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, leftSide: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, leftMargin: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, rightId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, rightSide: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, rightMargin: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, bias: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html )` Centers the widget horizontally to the left and right side on another widgets sides. |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties#centerHorizontallyRtl(int)(toView: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Centers the view horizontally relative to toView's position. |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties#centerHorizontallyRtl(int,int,int,int,int,int,float)( startId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, startSide: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, startMargin: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, endId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, endSide: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, endMargin: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, bias: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html )` Centers the widgets horizontally to the left and right side on another widgets sides. |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties#centerVertically(int)(toView: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Centers the view vertically relative to toView's position. |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties#centerVertically(int,int,int,int,int,int,float)( topId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, topSide: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, topMargin: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, bottomId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, bottomSide: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, bottomMargin: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, bias: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html )` Centers the widgets Vertically to the top and bottom side on another widgets sides. |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties#connect(int,int,int,int)(startSide: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, endID: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, endSide: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, margin: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Create a constraint between two widgets. |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties#constrainDefaultHeight(int)(height: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Sets how the height is calculated ether MATCH_CONSTRAINT_WRAP or MATCH_CONSTRAINT_SPREAD. |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties#constrainDefaultWidth(int)(width: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Sets how the width is calculated ether MATCH_CONSTRAINT_WRAP or MATCH_CONSTRAINT_SPREAD. |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties#constrainHeight(int)(height: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Sets the height of the view. |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties#constrainMaxHeight(int)(height: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Sets the maximum height of the view. |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties#constrainMaxWidth(int)(width: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Sets the maximum width of the view. |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties#constrainMinHeight(int)(height: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Sets the minimum height of the view. |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties#constrainMinWidth(int)(width: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Sets the minimum width of the view. |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties#constrainWidth(int)(width: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Sets the width of the view. |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties#dimensionRatio(java.lang.String)(ratio: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!)` Constrains the views aspect ratio. |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties#elevation(float)(elevation: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` Set the elevation of a view. |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties#goneMargin(int,int)(anchor: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Sets the gone margin. |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties#horizontalBias(float)(bias: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` Adjust the horizontal bias of the view (used with views constrained on left and right). |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties#horizontalChainStyle(int)(chainStyle: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` How the elements of the horizontal chain will be positioned. |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties#horizontalWeight(float)(weight: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` The child's weight that we can use to distribute the available horizontal space in a chain, if the dimension behaviour is set to MATCH_CONSTRAINT |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties#margin(int,int)(anchor: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Sets the margin. |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties#removeConstraints(int)(anchor: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Remove a constraint from this view. |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties#removeFromHorizontalChain()()` Removes a view from a vertical chain. |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties#removeFromVerticalChain()()` Removes a view from a vertical chain. |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties#rotation(float)(rotation: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` Adjust the post-layout rotation about the Z axis of a view. |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties#rotationX(float)(rotationX: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` Adjust the post-layout rotation about the X axis of a view. |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties#rotationY(float)(rotationY: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` Adjust the post-layout rotation about the Y axis of a view. |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties#scaleX(float)(scaleX: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` Adjust the post-layout scale in X of a view. |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties#scaleY(float)(scaleY: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` Adjust the post-layout scale in Y of a view. |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties#transformPivot(float,float)(transformPivotX: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, transformPivotY: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` Set X and Y location of the pivot point around which the view will rotate and scale. |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties#transformPivotX(float)(transformPivotX: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` Set X location of the pivot point around which the view will rotate and scale. |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties#transformPivotY(float)(transformPivotY: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` Set Y location of the pivot point around which the view will rotate and scale. |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties#translation(float,float)(translationX: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, translationY: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` Adjust the post-layout X and Y translation of a view. |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties#translationX(float)(translationX: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` Adjust the post-layout X translation of a view. |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties#translationY(float)(translationY: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` Adjust the post-layout Y translation of a view. |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties#translationZ(float)(translationZ: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` Adjust the post-layout translation in Z of a view. |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties#verticalBias(float)(bias: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` Adjust the vertical bias of the view (used with views constrained on left and right). |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties#verticalChainStyle(int)(chainStyle: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` How the elements of the vertical chain will be positioned. in a chain, if the dimension behaviour is set to MATCH_CONSTRAINT |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties#verticalWeight(float)(weight: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` The child's weight that we can use to distribute the available vertical space in a chain, if the dimension behaviour is set to MATCH_CONSTRAINT |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/widget/ConstraintProperties#visibility(int)(visibility: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Adjust the visibility of a view. |

## Constants

### BASELINE

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

```
const val BASELINE = 5: Int
```

The baseline of the text in a view.

### BOTTOM

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

```
const val BOTTOM = 4: Int
```

The bottom side of a view.

### END

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

```
const val END = 7: Int
```

The right side of a view in left to right languages. In right to left languages it corresponds to the left side of the view

### LEFT

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

```
const val LEFT = 1: Int
```

The left side of a view.

### MATCH_CONSTRAINT

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

```
const val MATCH_CONSTRAINT = 0: Int
```

Dimension will be controlled by constraints

### MATCH_CONSTRAINT_SPREAD

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

```
const val MATCH_CONSTRAINT_SPREAD = 0: Int
```

Calculate the size of a view in 0 dp by reducing the constrains gaps as much as possible

### MATCH_CONSTRAINT_WRAP

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

```
const val MATCH_CONSTRAINT_WRAP = 1: Int
```

How to calculate the size of a view in 0 dp by using its wrap_content size

### PARENT_ID

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

```
const val PARENT_ID = 0: Int
```

References the id of the parent.

### RIGHT

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

```
const val RIGHT = 2: Int
```

The right side of a view.

### START

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

```
const val START = 6: Int
```

The left side of a view in left to right languages. In right to left languages it corresponds to the right side of the view

### TOP

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

```
const val TOP = 3: Int
```

The top of a view.

### UNSET

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

```
const val UNSET = -1: Int
```

Used to indicate a parameter is cleared or not set

### WRAP_CONTENT

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

```
const val WRAP_CONTENT = -2: Int
```

Dimension will set by the view's content

## Public constructors

### ConstraintProperties

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

```
ConstraintProperties(view: View!)
```

## Public functions

### addToHorizontalChain

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

```
fun addToHorizontalChain(leftId: Int, rightId: Int): ConstraintProperties!
```

Adds the view to a horizontal chain.

| Parameters |
|---|---|
| `leftId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | id of the view in chain to the left |
| `rightId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | id of the view in chain to the right |

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

### addToHorizontalChainRTL

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

```
fun addToHorizontalChainRTL(leftId: Int, rightId: Int): ConstraintProperties!
```

Adds the view to a horizontal chain using RTL attributes.

| Parameters |
|---|---|
| `leftId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | id of the view in chain to the left |
| `rightId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | id of the view in chain to the right |

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

### addToVerticalChain

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

```
fun addToVerticalChain(topId: Int, bottomId: Int): ConstraintProperties!
```

Adds a view to a vertical chain.

| Parameters |
|---|---|
| `topId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | view above. |
| `bottomId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | view below |

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

### alpha

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

```
fun alpha(alpha: Float): ConstraintProperties!
```

Adjust the alpha of a view.

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

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

### apply

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

```
fun apply(): Unit
```

Should be called to apply the changes currently a no op in place for subclasses and future use

### center

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

```
fun center(
    firstID: Int,
    firstSide: Int,
    firstMargin: Int,
    secondId: Int,
    secondSide: Int,
    secondMargin: Int,
    bias: Float
): ConstraintProperties!
```

Center view between the other two widgets.

| Parameters |
|---|---|
| `firstID: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | ID of the first widget to connect the left or top of the widget to |
| `firstSide: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | the side of the widget to connect to |
| `firstMargin: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | the connection margin |
| `secondId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | the ID of the second widget to connect to right or top of the widget to |
| `secondSide: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | the side of the widget to connect to |
| `secondMargin: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | the connection margin |
| `bias: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | the ratio between two connections |

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

### centerHorizontally

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

```
fun centerHorizontally(toView: Int): ConstraintProperties!
```

Centers the view horizontally relative to toView's position.

| Parameters |
|---|---|
| `toView: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | ID of view to center on (or in) |

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

### centerHorizontally

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

```
fun centerHorizontally(
    leftId: Int,
    leftSide: Int,
    leftMargin: Int,
    rightId: Int,
    rightSide: Int,
    rightMargin: Int,
    bias: Float
): ConstraintProperties!
```

Centers the widget horizontally to the left and right side on another widgets sides.

| Parameters |
|---|---|
| `leftId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The Id of the widget on the left side |
| `leftSide: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The side of the leftId widget to connect to |
| `leftMargin: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The margin on the left side |
| `rightId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The Id of the widget on the right side |
| `rightSide: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The side of the rightId widget to connect to |
| `rightMargin: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The margin on the right side |
| `bias: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | The ratio of the space on the left vs. right sides 0.5 is centered (default) |

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

### centerHorizontallyRtl

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

```
fun centerHorizontallyRtl(toView: Int): ConstraintProperties!
```

Centers the view horizontally relative to toView's position.

| Parameters |
|---|---|
| `toView: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | ID of view to center on (or in) |

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

### centerHorizontallyRtl

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

```
fun centerHorizontallyRtl(
    startId: Int,
    startSide: Int,
    startMargin: Int,
    endId: Int,
    endSide: Int,
    endMargin: Int,
    bias: Float
): ConstraintProperties!
```

Centers the widgets horizontally to the left and right side on another widgets sides.

| Parameters |
|---|---|
| `startId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The Id of the widget on the start side (left in non rtl languages) |
| `startSide: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The side of the startId widget to connect to |
| `startMargin: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The margin on the start side |
| `endId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The Id of the widget on the start side (left in non rtl languages) |
| `endSide: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The side of the endId widget to connect to |
| `endMargin: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The margin on the end side |
| `bias: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | The ratio of the space on the start vs end side 0.5 is centered (default) |

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

### centerVertically

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

```
fun centerVertically(toView: Int): ConstraintProperties!
```

Centers the view vertically relative to toView's position.

| Parameters |
|---|---|
| `toView: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | ID of view to center on (or in) |

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

### centerVertically

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

```
fun centerVertically(
    topId: Int,
    topSide: Int,
    topMargin: Int,
    bottomId: Int,
    bottomSide: Int,
    bottomMargin: Int,
    bias: Float
): ConstraintProperties!
```

Centers the widgets Vertically to the top and bottom side on another widgets sides.

| Parameters |
|---|---|
| `topId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The Id of the widget on the top side |
| `topSide: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The side of the leftId widget to connect to |
| `topMargin: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The margin on the top side |
| `bottomId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The Id of the widget on the bottom side |
| `bottomSide: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The side of the bottomId widget to connect to |
| `bottomMargin: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The margin on the bottom side |
| `bias: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | The ratio of the space on the top vs. bottom sides 0.5 is centered (default) |

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

### connect

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

```
fun connect(startSide: Int, endID: Int, endSide: Int, margin: Int): ConstraintProperties!
```

Create a constraint between two widgets.

| Parameters |
|---|---|
| `startSide: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | the side of the widget to constrain |
| `endID: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | the id of the widget to constrain to |
| `endSide: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | the side of widget to constrain to |
| `margin: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | the margin to constrain (margin must be positive) |

### constrainDefaultHeight

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

```
fun constrainDefaultHeight(height: Int): ConstraintProperties!
```

Sets how the height is calculated ether MATCH_CONSTRAINT_WRAP or MATCH_CONSTRAINT_SPREAD. Default is spread.

| Parameters |
|---|---|
| `height: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | MATCH_CONSTRAINT_WRAP or MATCH_CONSTRAINT_SPREAD |

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

### constrainDefaultWidth

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

```
fun constrainDefaultWidth(width: Int): ConstraintProperties!
```

Sets how the width is calculated ether MATCH_CONSTRAINT_WRAP or MATCH_CONSTRAINT_SPREAD. Default is spread.

| Parameters |
|---|---|
| `width: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | MATCH_CONSTRAINT_WRAP or MATCH_CONSTRAINT_SPREAD |

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

### constrainHeight

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

```
fun constrainHeight(height: Int): ConstraintProperties!
```

Sets the height of the view.

| Parameters |
|---|---|
| `height: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | the height of the view |

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

### constrainMaxHeight

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

```
fun constrainMaxHeight(height: Int): ConstraintProperties!
```

Sets the maximum height of the view. It is a dimension, It is only applicable if height is #MATCH_CONSTRAINT}.

| Parameters |
|---|---|
| `height: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | the maximum height of the view |

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

### constrainMaxWidth

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

```
fun constrainMaxWidth(width: Int): ConstraintProperties!
```

Sets the maximum width of the view. It is a dimension, It is only applicable if height is #MATCH_CONSTRAINT}.

| Parameters |
|---|---|
| `width: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | the maximum width of the view |

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

### constrainMinHeight

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

```
fun constrainMinHeight(height: Int): ConstraintProperties!
```

Sets the minimum height of the view. It is a dimension, It is only applicable if height is #MATCH_CONSTRAINT}.

| Parameters |
|---|---|
| `height: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | the minimum height of the view |

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

### constrainMinWidth

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

```
fun constrainMinWidth(width: Int): ConstraintProperties!
```

Sets the minimum width of the view. It is a dimension, It is only applicable if height is #MATCH_CONSTRAINT}.

| Parameters |
|---|---|
| `width: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | the minimum width of the view |

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

### constrainWidth

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

```
fun constrainWidth(width: Int): ConstraintProperties!
```

Sets the width of the view.

| Parameters |
|---|---|
| `width: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | the width of the view |

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

### dimensionRatio

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

```
fun dimensionRatio(ratio: String!): ConstraintProperties!
```

Constrains the views aspect ratio. For Example a HD screen is 16 by 9 = 16/(float)9 = 1.777f.

| Parameters |
|---|---|
| `ratio: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | The ratio of the width to height (width / height) |

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

### elevation

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

```
fun elevation(elevation: Float): ConstraintProperties!
```

Set the elevation of a view.

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

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

### goneMargin

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

```
fun goneMargin(anchor: Int, value: Int): ConstraintProperties!
```

Sets the gone margin.

| Parameters |
|---|---|
| `anchor: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The side to adjust the margin on |
| `value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The new value for the margin |

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

### horizontalBias

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

```
fun horizontalBias(bias: Float): ConstraintProperties!
```

Adjust the horizontal bias of the view (used with views constrained on left and right).

| Parameters |
|---|---|
| `bias: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | the new bias 0.5 is in the middle |

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

### horizontalChainStyle

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

```
fun horizontalChainStyle(chainStyle: Int): ConstraintProperties!
```

How the elements of the horizontal chain will be positioned. If the dimension behaviour is set to MATCH_CONSTRAINT. The possible values are:

- CHAIN_SPREAD -- the elements will be spread out
- CHAIN_SPREAD_INSIDE -- similar, but the endpoints of the chain will not be spread out
- CHAIN_PACKED -- the elements of the chain will be packed together. The horizontal bias attribute of the child will then affect the positioning of the packed elements

| Parameters |
|---|---|
| `chainStyle: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | the weight that we can use to distribute the horizontal space |

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

### horizontalWeight

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

```
fun horizontalWeight(weight: Float): ConstraintProperties!
```

The child's weight that we can use to distribute the available horizontal space in a chain, if the dimension behaviour is set to MATCH_CONSTRAINT

| Parameters |
|---|---|
| `weight: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | the weight that we can use to distribute the horizontal space |

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

### margin

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

```
fun margin(anchor: Int, value: Int): ConstraintProperties!
```

Sets the margin.

| Parameters |
|---|---|
| `anchor: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The side to adjust the margin on |
| `value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The new value for the margin |

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

### removeConstraints

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

```
fun removeConstraints(anchor: Int): ConstraintProperties!
```

Remove a constraint from this view.

| Parameters |
|---|---|
| `anchor: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | the Anchor to remove constraint from |

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

### removeFromHorizontalChain

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

```
fun removeFromHorizontalChain(): ConstraintProperties!
```

Removes a view from a vertical chain. This assumes the view is connected to a vertical chain. Its behaviour is undefined if not part of a vertical chain.

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

### removeFromVerticalChain

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

```
fun removeFromVerticalChain(): ConstraintProperties!
```

Removes a view from a vertical chain. This assumes the view is connected to a vertical chain. Its behaviour is undefined if not part of a vertical chain.

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

### rotation

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

```
fun rotation(rotation: Float): ConstraintProperties!
```

Adjust the post-layout rotation about the Z axis of a view.

| Parameters |
|---|---|
| `rotation: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | the rotation about the Z axis |

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

### rotationX

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

```
fun rotationX(rotationX: Float): ConstraintProperties!
```

Adjust the post-layout rotation about the X axis of a view.

| Parameters |
|---|---|
| `rotationX: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | the rotation about the X axis |

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

### rotationY

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

```
fun rotationY(rotationY: Float): ConstraintProperties!
```

Adjust the post-layout rotation about the Y axis of a view.

| Parameters |
|---|---|
| `rotationY: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | the rotation about the Y axis |

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

### scaleX

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

```
fun scaleX(scaleX: Float): ConstraintProperties!
```

Adjust the post-layout scale in X of a view.

| Parameters |
|---|---|
| `scaleX: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | the scale in X |

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

### scaleY

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

```
fun scaleY(scaleY: Float): ConstraintProperties!
```

Adjust the post-layout scale in Y of a view.

| Parameters |
|---|---|
| `scaleY: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | the scale in Y |

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

### transformPivot

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

```
fun transformPivot(transformPivotX: Float, transformPivotY: Float): ConstraintProperties!
```

Set X and Y location of the pivot point around which the view will rotate and scale.

| Parameters |
|---|---|
| `transformPivotX: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | X location of the pivot point. |
| `transformPivotY: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | Y location of the pivot point. |

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

### transformPivotX

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

```
fun transformPivotX(transformPivotX: Float): ConstraintProperties!
```

Set X location of the pivot point around which the view will rotate and scale.

| Parameters |
|---|---|
| `transformPivotX: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | X location of the pivot point. |

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

### transformPivotY

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

```
fun transformPivotY(transformPivotY: Float): ConstraintProperties!
```

Set Y location of the pivot point around which the view will rotate and scale.

| Parameters |
|---|---|
| `transformPivotY: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | Y location of the pivot point. |

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

### translation

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

```
fun translation(translationX: Float, translationY: Float): ConstraintProperties!
```

Adjust the post-layout X and Y translation of a view.

| Parameters |
|---|---|
| `translationX: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | the translation in X |
| `translationY: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | the translation in Y |

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

### translationX

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

```
fun translationX(translationX: Float): ConstraintProperties!
```

Adjust the post-layout X translation of a view.

| Parameters |
|---|---|
| `translationX: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | the translation in X |

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

### translationY

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

```
fun translationY(translationY: Float): ConstraintProperties!
```

Adjust the post-layout Y translation of a view.

| Parameters |
|---|---|
| `translationY: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | the translation in Y |

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

### translationZ

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

```
fun translationZ(translationZ: Float): ConstraintProperties!
```

Adjust the post-layout translation in Z of a view. This is the preferred way to adjust the shadow.

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

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

### verticalBias

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

```
fun verticalBias(bias: Float): ConstraintProperties!
```

Adjust the vertical bias of the view (used with views constrained on left and right).

| Parameters |
|---|---|
| `bias: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | the new bias 0.5 is in the middle |

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

### verticalChainStyle

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

```
fun verticalChainStyle(chainStyle: Int): ConstraintProperties!
```

How the elements of the vertical chain will be positioned. in a chain, if the dimension behaviour is set to MATCH_CONSTRAINT

- CHAIN_SPREAD -- the elements will be spread out
- CHAIN_SPREAD_INSIDE -- similar, but the endpoints of the chain will not be spread out
- CHAIN_PACKED -- the elements of the chain will be packed together. The horizontal bias attribute of the child will then affect the positioning of the packed elements

| Parameters |
|---|---|
| `chainStyle: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | the weight that we can use to distribute the horizontal space |

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

### verticalWeight

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

```
fun verticalWeight(weight: Float): ConstraintProperties!
```

The child's weight that we can use to distribute the available vertical space in a chain, if the dimension behaviour is set to MATCH_CONSTRAINT

| Parameters |
|---|---|
| `weight: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | the weight that we can use to distribute the vertical space |

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

### visibility

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

```
fun visibility(visibility: Int): ConstraintProperties!
```

Adjust the visibility of a view.

| Parameters |
|---|---|
| `visibility: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | the visibility (View.VISIBLE, View.INVISIBLE, View.GONE) |

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