# ChainReference

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

*** ** * ** ***

<br />

```
class ChainReference : HelperReference
```

<br />

|---|---|---|---|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html) ||||
| ↳ | [androidx.constraintlayout.core.state.ConstraintReference](https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference) |||
|   | ↳ | [androidx.constraintlayout.core.state.HelperReference](https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/HelperReference) ||
|   |   | ↳ | [androidx.constraintlayout.core.state.helpers.ChainReference](https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/helpers/ChainReference) |

Known direct subclasses [HorizontalChainReference](https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/helpers/HorizontalChainReference), [VerticalChainReference](https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/helpers/VerticalChainReference)

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/helpers/HorizontalChainReference` |   |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/helpers/VerticalChainReference` |   |

*** ** * ** ***

`https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/HelperReference` for Chains. Elements should be added with `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/helpers/ChainReference#addChainElement(java.lang.String,float,float,float)`

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/helpers/ChainReference#ChainReference(androidx.constraintlayout.core.state.State,androidx.constraintlayout.core.state.State.Helper)(state: https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/State, type: https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/State.Helper)` |

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/helpers/ChainReference#addChainElement(java.lang.String,float,float,float)( id: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, weight: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, preMargin: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, postMargin: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html )` Adds the element by the given id to the Chain. |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/helpers/ChainReference` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/helpers/ChainReference#bias(float)(bias: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/helpers/ChainReference#getBias()()` |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/State.Chain` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/helpers/ChainReference#getStyle()()` |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/helpers/ChainReference` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/helpers/ChainReference#style(androidx.constraintlayout.core.state.State.Chain)(style: https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/State.Chain)` Sets the `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/State.Chain`. |

| ### Protected functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/helpers/ChainReference#getPostMargin(java.lang.String)(id: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/helpers/ChainReference#getPreMargin(java.lang.String)(id: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/helpers/ChainReference#getWeight(java.lang.String)(id: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)` |

| ### Protected properties |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/helpers/ChainReference#mBias()` |
| `https://developer.android.com/reference/java/util/HashMap.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!, https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html!>` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/helpers/ChainReference#mMapPostMargin()` **This property is deprecated.** Unintended visibility, use `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/helpers/ChainReference#getPostMargin(java.lang.String)` instead <br /> |
| `https://developer.android.com/reference/java/util/HashMap.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!, https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html!>` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/helpers/ChainReference#mMapPreMargin()` **This property is deprecated.** Unintended visibility, use `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/helpers/ChainReference#getPreMargin(java.lang.String)` instead <br /> |
| `https://developer.android.com/reference/java/util/HashMap.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!, https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html!>` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/helpers/ChainReference#mMapWeights()` **This property is deprecated.** Unintended visibility, use `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/helpers/ChainReference#getWeight(java.lang.String)` instead <br /> |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/State.Chain` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/helpers/ChainReference#mStyle()` |

### Inherited functions

From [androidx.constraintlayout.core.state.ConstraintReference](https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference) `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#addCustomColor(java.lang.String,int)(name: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!, color: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#addCustomFloat(java.lang.String,float)(name: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!, value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference!` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#alpha(float)(alpha: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#applyWidgetConstraints()()`

apply all the constraints attributes of the mConstraintWidget
`https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference!` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#baseline()()` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference!` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#baselineToBaseline(java.lang.Object)(reference: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html!)` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference!` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#baselineToBottom(java.lang.Object)(reference: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html!)` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference!` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#baselineToTop(java.lang.Object)(reference: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html!)` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference!` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#bottom()()` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference!` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#bottomToBottom(java.lang.Object)(reference: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html!)` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference!` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#bottomToTop(java.lang.Object)(reference: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html!)` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference!` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#centerHorizontally(java.lang.Object)(reference: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html!)` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference!` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#centerVertically(java.lang.Object)(reference: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html!)` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference!` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#circularConstraint(java.lang.Object,float,float)(reference: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html!, angle: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, distance: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference!` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#clear()()` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference!` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#clearAll()()`

Clears all constraints.
`https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference!` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#clearHorizontal()()` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference!` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#clearVertical()()` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/widgets/ConstraintWidget!` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#createConstraintWidget()()` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference!` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#end()()` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference!` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#endToEnd(java.lang.Object)(reference: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html!)` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference!` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#endToStart(java.lang.Object)(reference: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html!)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#getAlpha()()` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/helpers/Facade!` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#getFacade()()` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/Dimension!` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#getHeight()()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#getHorizontalChainStyle()()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#getHorizontalChainWeight()()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html!` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#getKey()()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#getPivotX()()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#getPivotY()()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#getRotationX()()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#getRotationY()()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#getRotationZ()()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#getScaleX()()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#getScaleY()()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#getTag()()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#getTranslationX()()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#getTranslationY()()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#getTranslationZ()()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#getVerticalChainStyle(int)(chainStyle: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#getVerticalChainWeight()()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html!` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#getView()()` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/Dimension!` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#getWidth()()` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference!` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#height(androidx.constraintlayout.core.state.Dimension)(dimension: https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/Dimension!)` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference!` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#horizontalBias(float)(value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference!` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#left()()` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference!` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#leftToLeft(java.lang.Object)(reference: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html!)` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference!` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#leftToRight(java.lang.Object)(reference: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html!)` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference!` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#margin(java.lang.Object)(marginValue: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html!)` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference!` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#margin(int)(value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference!` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#marginGone(java.lang.Object)(marginGoneValue: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html!)` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference!` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#marginGone(int)(value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference!` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#pivotX(float)(x: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference!` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#pivotY(float)(y: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference!` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#right()()` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference!` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#rightToLeft(java.lang.Object)(reference: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html!)` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference!` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#rightToRight(java.lang.Object)(reference: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html!)` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference!` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#rotationX(float)(x: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference!` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#rotationY(float)(y: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference!` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#rotationZ(float)(z: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference!` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#scaleX(float)(x: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference!` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#scaleY(float)(y: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#setConstraintWidget(androidx.constraintlayout.core.widgets.ConstraintWidget)(widget: https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/widgets/ConstraintWidget!)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#setFacade(androidx.constraintlayout.core.state.helpers.Facade)(facade: https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/helpers/Facade!)` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference!` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#setHeight(androidx.constraintlayout.core.state.Dimension)(dimension: https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/Dimension!)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#setHorizontalChainStyle(int)(chainStyle: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#setHorizontalChainWeight(float)(weight: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#setKey(java.lang.Object)(key: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html!)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#setTag(java.lang.String)(tag: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#setVerticalChainStyle(int)(chainStyle: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#setVerticalChainWeight(float)(weight: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#setView(java.lang.Object)(view: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html!)` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference!` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#setWidth(androidx.constraintlayout.core.state.Dimension)(dimension: https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/Dimension!)` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference!` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#start()()` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference!` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#startToEnd(java.lang.Object)(reference: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html!)` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference!` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#startToStart(java.lang.Object)(reference: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html!)` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference!` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#top()()` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference!` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#topToBottom(java.lang.Object)(reference: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html!)` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference!` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#topToTop(java.lang.Object)(reference: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html!)` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference!` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#translationX(float)(x: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference!` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#translationY(float)(y: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference!` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#translationZ(float)(z: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#validate()()`

Validate the constraints
`https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference!` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#verticalBias(float)(value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference!` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#visibility(int)(visibility: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference!` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#width(androidx.constraintlayout.core.state.Dimension)(dimension: https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/Dimension!)` From [androidx.constraintlayout.core.state.HelperReference](https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/HelperReference) `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/HelperReference!` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/HelperReference#add(java.lang.Object...)(objects: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html!>!)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/HelperReference#apply()()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/HelperReference#applyBase()()`

Allows the derived classes to invoke the apply method in the ConstraintReference
`https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/widgets/ConstraintWidget!` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/HelperReference#getConstraintWidget()()` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/widgets/HelperWidget!` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/HelperReference#getHelperWidget()()` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/State.Helper!` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/HelperReference#getType()()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/HelperReference#setHelperWidget(androidx.constraintlayout.core.widgets.HelperWidget)(helperWidget: https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/widgets/HelperWidget!)`

### Inherited properties

From [androidx.constraintlayout.core.state.ConstraintReference](https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference) `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html!` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#mBottomToBottom()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html!` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#mBottomToTop()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html!` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#mEndToEnd()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html!` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#mEndToStart()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#mHorizontalBias()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html!` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#mLeftToLeft()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html!` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#mLeftToRight()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#mMarginBottom()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#mMarginBottomGone()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#mMarginEnd()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#mMarginEndGone()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#mMarginLeft()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#mMarginLeftGone()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#mMarginRight()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#mMarginRightGone()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#mMarginStart()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#mMarginStartGone()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#mMarginTop()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#mMarginTopGone()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html!` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#mRightToLeft()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html!` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#mRightToRight()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html!` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#mStartToEnd()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html!` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#mStartToStart()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html!` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#mTopToBottom()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html!` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#mTopToTop()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/ConstraintReference#mVerticalBias()` From [androidx.constraintlayout.core.state.HelperReference](https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/HelperReference) `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/State!` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/HelperReference#mHelperState()` `https://developer.android.com/reference/java/util/ArrayList.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html!>!` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/HelperReference#mReferences()`

## Public constructors

### ChainReference

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

```
ChainReference(state: State, type: State.Helper)
```

## Public functions

### addChainElement

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

```
fun addChainElement(
    id: String,
    weight: Float,
    preMargin: Float,
    postMargin: Float
): Unit
```

Adds the element by the given id to the Chain. The order in which the elements are added is important. It will represent the element's position in the Chain.

| Parameters |
|---|---|
| `id: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | Id of the element to add |
| `weight: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | Weight used to distribute remaining space to each element |
| `preMargin: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | Additional space in pixels between the added element and the previous one (if any) |
| `postMargin: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | Additional space in pixels between the added element and the next one (if any) |

### bias

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

```
fun bias(bias: Float): ChainReference
```

### getBias

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

```
fun getBias(): Float
```

### getStyle

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

```
fun getStyle(): State.Chain
```

### style

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

```
fun style(style: State.Chain): ChainReference
```

Sets the `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/State.Chain`.

| Parameters |
|---|---|
| `style: https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/State.Chain` | Defines the way the chain will lay out its elements |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/helpers/ChainReference` | This same instance |

## Protected functions

### getPostMargin

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

```
protected fun getPostMargin(id: String): Float
```

### getPreMargin

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

```
protected fun getPreMargin(id: String): Float
```

### getWeight

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

```
protected fun getWeight(id: String): Float
```

## Protected properties

### mBias

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

```
protected val mBias: Float
```

### mMapPostMargin

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

```
protected val mMapPostMargin: HashMap<String!, Float!>
```

> [!CAUTION]
> **This property is deprecated.**   
>
> Unintended visibility, use `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/helpers/ChainReference#getPostMargin(java.lang.String)` instead

### mMapPreMargin

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

```
protected val mMapPreMargin: HashMap<String!, Float!>
```

> [!CAUTION]
> **This property is deprecated.**   
>
> Unintended visibility, use `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/helpers/ChainReference#getPreMargin(java.lang.String)` instead

### mMapWeights

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

```
protected val mMapWeights: HashMap<String!, Float!>
```

> [!CAUTION]
> **This property is deprecated.**   
>
> Unintended visibility, use `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/state/helpers/ChainReference#getWeight(java.lang.String)` instead

### mStyle

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

```
protected val mStyle: State.Chain
```