# ConstraintSet

Summary:[Constants](https://developer.android.com/reference/android/support/constraint/ConstraintSet#constants)\|[Fields](https://developer.android.com/reference/android/support/constraint/ConstraintSet#lfields)\|[Ctors](https://developer.android.com/reference/android/support/constraint/ConstraintSet#pubctors)\|[Methods](https://developer.android.com/reference/android/support/constraint/ConstraintSet#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/android/support/constraint/ConstraintSet#inhmethods)  

# ConstraintSet

| This package is part of the Android[support library](https://developer.android.com/topic/libraries/support-library)which is no longer maintained. The Constraint Layout support library has been superseded by the[AndroidX Constraint Layout library](https://developer.android.com/reference/androidx/constraintlayout/classes), which is part of[Jetpack](https://developer.android.com/jetpack). The`ConstraintSet`class has been superseded by[`androidx.constraintlayout.widget.ConstraintSet`](https://developer.android.com/reference/androidx/constraintlayout/widget/ConstraintSet). We recommend using the AndroidX libraries in all new projects. You should also consider[migrating](https://developer.android.com/jetpack/androidx/migrate)existing projects to AndroidX.

`
public


class
ConstraintSet
`  
`

extends Object


``


`

|---|------------------------------------------|
| java.lang.Object                            ||
| ↳ | android.support.constraint.ConstraintSet |

<br />

*** ** * ** ***

This class allows you to define programmatically a set of constraints to be used with[ConstraintLayout](https://developer.android.com/reference/android/support/constraint/ConstraintLayout).

For details about Constraint behaviour see[ConstraintLayout](https://developer.android.com/reference/android/support/constraint/ConstraintLayout). It lets you create and save constraints, and apply them to an existing ConstraintLayout. ConstraintsSet can be created in various ways:

- Manually  
  `c = new ConstraintSet(); c.connect(....);`
- from a R.layout.\* object  
  `c.clone(context, R.layout.layout1);`
- from a ConstraintLayout  
  `c.clone(clayout);`

Example code:  

```
import android.content.Context;
import android.os.Bundle;
import android.support.constraint.ConstraintLayout;
import android.support.constraint.ConstraintSet;
import android.support.transition.TransitionManager;
import android.support.v7.app.AppCompatActivity;
import android.view.View;

public class MainActivity extends AppCompatActivity {
    ConstraintSet mConstraintSet1 = new ConstraintSet(); // create a Constraint Set
    ConstraintSet mConstraintSet2 = new ConstraintSet(); // create a Constraint Set
    ConstraintLayout mConstraintLayout; // cache the ConstraintLayout
    boolean mOld = true;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        Context context = this;
        mConstraintSet2.clone(context, R.layout.state2); // get constraints from layout
        setContentView(R.layout.state1);
        mConstraintLayout = (ConstraintLayout) findViewById(R.id.activity_main);
        mConstraintSet1.clone(mConstraintLayout); // get constraints from ConstraintSet
    }

    public void foo(View view) {
        TransitionManager.beginDelayedTransition(mConstraintLayout);
        if (mOld = !mOld) {
            mConstraintSet1.applyTo(mConstraintLayout); // set new constraints
        }  else {
            mConstraintSet2.applyTo(mConstraintLayout); // set new constraints
        }
    }
}
```

<br />

## Summary

|                                                                                    ### Constants                                                                                    ||
|-------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `int` | [BASELINE](https://developer.android.com/reference/android/support/constraint/ConstraintSet#BASELINE) The baseline of the text in a view.                                    |
| `int` | [BOTTOM](https://developer.android.com/reference/android/support/constraint/ConstraintSet#BOTTOM) The bottom side of a view.                                                 |
| `int` | [END](https://developer.android.com/reference/android/support/constraint/ConstraintSet#END) The right side of a view in right to left languages.                             |
| `int` | [HORIZONTAL_GUIDELINE](https://developer.android.com/reference/android/support/constraint/ConstraintSet#HORIZONTAL_GUIDELINE) Used to create a horizontal create guidelines. |
| `int` | [LEFT](https://developer.android.com/reference/android/support/constraint/ConstraintSet#LEFT) The left side of a view.                                                       |
| `int` | [MATCH_CONSTRAINT](https://developer.android.com/reference/android/support/constraint/ConstraintSet#MATCH_CONSTRAINT) Dimension will be controlled by constraints            |
| `int` | [PARENT_ID](https://developer.android.com/reference/android/support/constraint/ConstraintSet#PARENT_ID) References the id of the parent.                                     |
| `int` | [RIGHT](https://developer.android.com/reference/android/support/constraint/ConstraintSet#RIGHT) The right side of a view.                                                    |
| `int` | [START](https://developer.android.com/reference/android/support/constraint/ConstraintSet#START) The left side of a view in left to right languages.                          |
| `int` | [TOP](https://developer.android.com/reference/android/support/constraint/ConstraintSet#TOP) The top of a view.                                                               |
| `int` | [UNSET](https://developer.android.com/reference/android/support/constraint/ConstraintSet#UNSET) Used to indicate a parameter is cleared or not set                           |
| `int` | [VERTICAL_GUIDELINE](https://developer.android.com/reference/android/support/constraint/ConstraintSet#VERTICAL_GUIDELINE) Used to create a vertical create guidelines.       |

|                                                                                                                        ### Fields                                                                                                                        ||
|----------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` public static final int` | [CHAIN_PACKED](https://developer.android.com/reference/android/support/constraint/ConstraintSet#CHAIN_PACKED) Chain packed style                                                                                             |
| ` public static final int` | [CHAIN_SPREAD](https://developer.android.com/reference/android/support/constraint/ConstraintSet#CHAIN_SPREAD) Chain spread style                                                                                             |
| ` public static final int` | [CHAIN_SPREAD_INSIDE](https://developer.android.com/reference/android/support/constraint/ConstraintSet#CHAIN_SPREAD_INSIDE) Chain spread inside style                                                                        |
| ` public static final int` | [GONE](https://developer.android.com/reference/android/support/constraint/ConstraintSet#GONE) This view is gone, and will not take any space for layout purposes.                                                            |
| ` public static final int` | [HORIZONTAL](https://developer.android.com/reference/android/support/constraint/ConstraintSet#HORIZONTAL) The horizontal orientation.                                                                                        |
| ` public static final int` | [INVISIBLE](https://developer.android.com/reference/android/support/constraint/ConstraintSet#INVISIBLE) This view is invisible, but it still takes up space for layout purposes.                                             |
| ` public static final int` | [MATCH_CONSTRAINT_SPREAD](https://developer.android.com/reference/android/support/constraint/ConstraintSet#MATCH_CONSTRAINT_SPREAD) Calculate the size of a view in 0 dp by reducing the constrains gaps as much as possible |
| ` public static final int` | [MATCH_CONSTRAINT_WRAP](https://developer.android.com/reference/android/support/constraint/ConstraintSet#MATCH_CONSTRAINT_WRAP) How to calculate the size of a view in 0 dp by using its wrap_content size                   |
| ` public static final int` | [VERTICAL](https://developer.android.com/reference/android/support/constraint/ConstraintSet#VERTICAL) The vertical orientation.                                                                                              |
| ` public static final int` | [VISIBLE](https://developer.android.com/reference/android/support/constraint/ConstraintSet#VISIBLE) This view is visible.                                                                                                    |
| ` public static final int` | [WRAP_CONTENT](https://developer.android.com/reference/android/support/constraint/ConstraintSet#WRAP_CONTENT) Dimension will set by the view's content                                                                       |

|                                                   ### Public constructors                                                    ||
|---------------------------------------------------------------------------------------------------------------------------|---|
| ` `[ConstraintSet](https://developer.android.com/reference/android/support/constraint/ConstraintSet#ConstraintSet())`() ` |

|                                                                                                                                                                                                                                                                                                                                                            ### Public methods                                                                                                                                                                                                                                                                                                                                                             ||
|-------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` void`                                                                                                                             | ` `[addColorAttributes](https://developer.android.com/reference/android/support/constraint/ConstraintSet#addColorAttributes(java.lang.String...))`(String... attributeName) `                                                                                                                                                                                                                                                                                                                                                                                                                        |
| ` void`                                                                                                                             | ` `[addFloatAttributes](https://developer.android.com/reference/android/support/constraint/ConstraintSet#addFloatAttributes(java.lang.String...))`(String... attributeName) `                                                                                                                                                                                                                                                                                                                                                                                                                        |
| ` void`                                                                                                                             | ` `[addIntAttributes](https://developer.android.com/reference/android/support/constraint/ConstraintSet#addIntAttributes(java.lang.String...))`(String... attributeName) `                                                                                                                                                                                                                                                                                                                                                                                                                            |
| ` void`                                                                                                                             | ` `[addStringAttributes](https://developer.android.com/reference/android/support/constraint/ConstraintSet#addStringAttributes(java.lang.String...))`(String... attributeName) `                                                                                                                                                                                                                                                                                                                                                                                                                      |
| ` void`                                                                                                                             | ` `[addToHorizontalChain](https://developer.android.com/reference/android/support/constraint/ConstraintSet#addToHorizontalChain(int,%20int,%20int))`(int viewId, int leftId, int rightId) ` Adds a view to a horizontal chain.                                                                                                                                                                                                                                                                                                                                                                       |
| ` void`                                                                                                                             | ` `[addToHorizontalChainRTL](https://developer.android.com/reference/android/support/constraint/ConstraintSet#addToHorizontalChainRTL(int,%20int,%20int))`(int viewId, int leftId, int rightId) ` Adds a view to a horizontal chain.                                                                                                                                                                                                                                                                                                                                                                 |
| ` void`                                                                                                                             | ` `[addToVerticalChain](https://developer.android.com/reference/android/support/constraint/ConstraintSet#addToVerticalChain(int,%20int,%20int))`(int viewId, int topId, int bottomId) ` Adds a view to a vertical chain.                                                                                                                                                                                                                                                                                                                                                                             |
| ` void`                                                                                                                             | ` `[applyCustomAttributes](https://developer.android.com/reference/android/support/constraint/ConstraintSet#applyCustomAttributes(android.support.constraint.ConstraintLayout))`(`[ConstraintLayout](https://developer.android.com/reference/android/support/constraint/ConstraintLayout)` constraintLayout) ` Apply custom attributes alone                                                                                                                                                                                                                                                         |
| ` void`                                                                                                                             | ` `[applyTo](https://developer.android.com/reference/android/support/constraint/ConstraintSet#applyTo(android.support.constraint.ConstraintLayout))`(`[ConstraintLayout](https://developer.android.com/reference/android/support/constraint/ConstraintLayout)` constraintLayout) ` Apply the constraints to a ConstraintLayout.                                                                                                                                                                                                                                                                      |
| ` void`                                                                                                                             | ` `[applyToHelper](https://developer.android.com/reference/android/support/constraint/ConstraintSet#applyToHelper(android.support.constraint.ConstraintHelper,%20ConstraintWidget,%20android.support.constraint.ConstraintLayout.LayoutParams,%20<any>))`(`[ConstraintHelper](https://developer.android.com/reference/android/support/constraint/ConstraintHelper)` helper, ConstraintWidget child, `[ConstraintLayout.LayoutParams](https://developer.android.com/reference/android/support/constraint/ConstraintLayout.LayoutParams)` layoutParams, ` mapIdToWidget) Apply Layout to Helper widget |
| ` void`                                                                                                                             | ` `[applyToLayoutParams](https://developer.android.com/reference/android/support/constraint/ConstraintSet#applyToLayoutParams(int,%20android.support.constraint.ConstraintLayout.LayoutParams))`(int id, `[ConstraintLayout.LayoutParams](https://developer.android.com/reference/android/support/constraint/ConstraintLayout.LayoutParams)` layoutParams) ` Fill in a ConstraintLayout LayoutParam based on the id.                                                                                                                                                                                 |
| ` void`                                                                                                                             | ` `[applyToWithoutCustom](https://developer.android.com/reference/android/support/constraint/ConstraintSet#applyToWithoutCustom(android.support.constraint.ConstraintLayout))`(`[ConstraintLayout](https://developer.android.com/reference/android/support/constraint/ConstraintLayout)` constraintLayout) ` Apply the constraints to a ConstraintLayout.                                                                                                                                                                                                                                            |
| ` void`                                                                                                                             | ` `[center](https://developer.android.com/reference/android/support/constraint/ConstraintSet#center(int,%20int,%20int,%20int,%20int,%20int,%20int,%20float))`(int centerID, int firstID, int firstSide, int firstMargin, int secondId, int secondSide, int secondMargin, float bias) ` Center widget between the other two widgets.                                                                                                                                                                                                                                                                  |
| ` void`                                                                                                                             | ` `[centerHorizontally](https://developer.android.com/reference/android/support/constraint/ConstraintSet#centerHorizontally(int,%20int,%20int,%20int,%20int,%20int,%20int,%20float))`(int centerID, int leftId, int leftSide, int leftMargin, int rightId, int rightSide, int rightMargin, float bias) ` Centers the widget horizontally to the left and right side on another widgets sides.                                                                                                                                                                                                        |
| ` void`                                                                                                                             | ` `[centerHorizontally](https://developer.android.com/reference/android/support/constraint/ConstraintSet#centerHorizontally(int,%20int))`(int viewId, int toView) ` Centers the view horizontally relative to toView's position.                                                                                                                                                                                                                                                                                                                                                                     |
| ` void`                                                                                                                             | ` `[centerHorizontallyRtl](https://developer.android.com/reference/android/support/constraint/ConstraintSet#centerHorizontallyRtl(int,%20int))`(int viewId, int toView) ` Centers the view horizontally relative to toView's position.                                                                                                                                                                                                                                                                                                                                                               |
| ` void`                                                                                                                             | ` `[centerHorizontallyRtl](https://developer.android.com/reference/android/support/constraint/ConstraintSet#centerHorizontallyRtl(int,%20int,%20int,%20int,%20int,%20int,%20int,%20float))`(int centerID, int startId, int startSide, int startMargin, int endId, int endSide, int endMargin, float bias) ` Centers the widgets horizontally to the left and right side on another widgets sides.                                                                                                                                                                                                    |
| ` void`                                                                                                                             | ` `[centerVertically](https://developer.android.com/reference/android/support/constraint/ConstraintSet#centerVertically(int,%20int))`(int viewId, int toView) ` Centers the view vertically relative to toView's position.                                                                                                                                                                                                                                                                                                                                                                           |
| ` void`                                                                                                                             | ` `[centerVertically](https://developer.android.com/reference/android/support/constraint/ConstraintSet#centerVertically(int,%20int,%20int,%20int,%20int,%20int,%20int,%20float))`(int centerID, int topId, int topSide, int topMargin, int bottomId, int bottomSide, int bottomMargin, float bias) ` Centers the widgets Vertically to the top and bottom side on another widgets sides.                                                                                                                                                                                                             |
| ` void`                                                                                                                             | ` `[clear](https://developer.android.com/reference/android/support/constraint/ConstraintSet#clear(int,%20int))`(int viewId, int anchor) ` Remove a constraint from this view.                                                                                                                                                                                                                                                                                                                                                                                                                        |
| ` void`                                                                                                                             | ` `[clear](https://developer.android.com/reference/android/support/constraint/ConstraintSet#clear(int))`(int viewId) ` Remove all constraints from this view.                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| ` void`                                                                                                                             | ` `[clone](https://developer.android.com/reference/android/support/constraint/ConstraintSet#clone(Context,%20int))`(Context context, int constraintLayoutId) ` Copy the constraints from a layout.                                                                                                                                                                                                                                                                                                                                                                                                   |
| ` void`                                                                                                                             | ` `[clone](https://developer.android.com/reference/android/support/constraint/ConstraintSet#clone(android.support.constraint.ConstraintLayout))`(`[ConstraintLayout](https://developer.android.com/reference/android/support/constraint/ConstraintLayout)` constraintLayout) ` Copy the layout parameters of a ConstraintLayout.                                                                                                                                                                                                                                                                     |
| ` void`                                                                                                                             | ` `[clone](https://developer.android.com/reference/android/support/constraint/ConstraintSet#clone(android.support.constraint.Constraints))`(`[Constraints](https://developer.android.com/reference/android/support/constraint/Constraints)` constraints) ` Copy the layout parameters of a ConstraintLayout.                                                                                                                                                                                                                                                                                         |
| ` void`                                                                                                                             | ` `[clone](https://developer.android.com/reference/android/support/constraint/ConstraintSet#clone(android.support.constraint.ConstraintSet))`(`[ConstraintSet](https://developer.android.com/reference/android/support/constraint/ConstraintSet)` set) ` Copy the constraints from a layout.                                                                                                                                                                                                                                                                                                         |
| ` void`                                                                                                                             | ` `[connect](https://developer.android.com/reference/android/support/constraint/ConstraintSet#connect(int,%20int,%20int,%20int,%20int))`(int startID, int startSide, int endID, int endSide, int margin) ` Create a constraint between two widgets.                                                                                                                                                                                                                                                                                                                                                  |
| ` void`                                                                                                                             | ` `[connect](https://developer.android.com/reference/android/support/constraint/ConstraintSet#connect(int,%20int,%20int,%20int))`(int startID, int startSide, int endID, int endSide) ` Create a constraint between two widgets.                                                                                                                                                                                                                                                                                                                                                                     |
| ` void`                                                                                                                             | ` `[constrainCircle](https://developer.android.com/reference/android/support/constraint/ConstraintSet#constrainCircle(int,%20int,%20int,%20float))`(int viewId, int id, int radius, float angle) ` Constrain the view on a circle constraint                                                                                                                                                                                                                                                                                                                                                         |
| ` void`                                                                                                                             | ` `[constrainDefaultHeight](https://developer.android.com/reference/android/support/constraint/ConstraintSet#constrainDefaultHeight(int,%20int))`(int viewId, int height) ` Sets how the height is calculated ether MATCH_CONSTRAINT_WRAP or MATCH_CONSTRAINT_SPREAD.                                                                                                                                                                                                                                                                                                                                |
| ` void`                                                                                                                             | ` `[constrainDefaultWidth](https://developer.android.com/reference/android/support/constraint/ConstraintSet#constrainDefaultWidth(int,%20int))`(int viewId, int width) ` Sets how the width is calculated ether MATCH_CONSTRAINT_WRAP or MATCH_CONSTRAINT_SPREAD.                                                                                                                                                                                                                                                                                                                                    |
| ` void`                                                                                                                             | ` `[constrainHeight](https://developer.android.com/reference/android/support/constraint/ConstraintSet#constrainHeight(int,%20int))`(int viewId, int height) ` Sets the height of the view.                                                                                                                                                                                                                                                                                                                                                                                                           |
| ` void`                                                                                                                             | ` `[constrainMaxHeight](https://developer.android.com/reference/android/support/constraint/ConstraintSet#constrainMaxHeight(int,%20int))`(int viewId, int height) ` Sets the maximum height of the view.                                                                                                                                                                                                                                                                                                                                                                                             |
| ` void`                                                                                                                             | ` `[constrainMaxWidth](https://developer.android.com/reference/android/support/constraint/ConstraintSet#constrainMaxWidth(int,%20int))`(int viewId, int width) ` Sets the maximum width of the view.                                                                                                                                                                                                                                                                                                                                                                                                 |
| ` void`                                                                                                                             | ` `[constrainMinHeight](https://developer.android.com/reference/android/support/constraint/ConstraintSet#constrainMinHeight(int,%20int))`(int viewId, int height) ` Sets the height of the view.                                                                                                                                                                                                                                                                                                                                                                                                     |
| ` void`                                                                                                                             | ` `[constrainMinWidth](https://developer.android.com/reference/android/support/constraint/ConstraintSet#constrainMinWidth(int,%20int))`(int viewId, int width) ` Sets the width of the view.                                                                                                                                                                                                                                                                                                                                                                                                         |
| ` void`                                                                                                                             | ` `[constrainPercentHeight](https://developer.android.com/reference/android/support/constraint/ConstraintSet#constrainPercentHeight(int,%20float))`(int viewId, float percent) ` Sets the height of the view as a percentage of the parent.                                                                                                                                                                                                                                                                                                                                                          |
| ` void`                                                                                                                             | ` `[constrainPercentWidth](https://developer.android.com/reference/android/support/constraint/ConstraintSet#constrainPercentWidth(int,%20float))`(int viewId, float percent) ` Sets the width of the view as a percentage of the parent.                                                                                                                                                                                                                                                                                                                                                             |
| ` void`                                                                                                                             | ` `[constrainWidth](https://developer.android.com/reference/android/support/constraint/ConstraintSet#constrainWidth(int,%20int))`(int viewId, int width) ` Sets the width of the view.                                                                                                                                                                                                                                                                                                                                                                                                               |
| ` void`                                                                                                                             | ` `[create](https://developer.android.com/reference/android/support/constraint/ConstraintSet#create(int,%20int))`(int guidelineID, int orientation) ` Creates a ConstraintLayout virtual object.                                                                                                                                                                                                                                                                                                                                                                                                     |
| ` void`                                                                                                                             | ` `[createBarrier](https://developer.android.com/reference/android/support/constraint/ConstraintSet#createBarrier(int,%20int,%20int,%20int...))`(int id, int direction, int margin, int... referenced) ` Creates a ConstraintLayout Barrier object.                                                                                                                                                                                                                                                                                                                                                  |
| ` void`                                                                                                                             | ` `[createHorizontalChain](https://developer.android.com/reference/android/support/constraint/ConstraintSet#createHorizontalChain(int,%20int,%20int,%20int,%20int[],%20float[],%20int))`(int leftId, int leftSide, int rightId, int rightSide, int[] chainIds, float[] weights, int style) ` Spaces a set of widgets horizontal between the view startID and endId.                                                                                                                                                                                                                                  |
| ` void`                                                                                                                             | ` `[createHorizontalChainRtl](https://developer.android.com/reference/android/support/constraint/ConstraintSet#createHorizontalChainRtl(int,%20int,%20int,%20int,%20int[],%20float[],%20int))`(int startId, int startSide, int endId, int endSide, int[] chainIds, float[] weights, int style) ` Spaces a set of widgets horizontal between the view startID and endId.                                                                                                                                                                                                                              |
| ` void`                                                                                                                             | ` `[createVerticalChain](https://developer.android.com/reference/android/support/constraint/ConstraintSet#createVerticalChain(int,%20int,%20int,%20int,%20int[],%20float[],%20int))`(int topId, int topSide, int bottomId, int bottomSide, int[] chainIds, float[] weights, int style) ` Spaces a set of widgets vertically between the view topId and bottomId.                                                                                                                                                                                                                                     |
| ` boolean`                                                                                                                          | ` `[getApplyElevation](https://developer.android.com/reference/android/support/constraint/ConstraintSet#getApplyElevation(int))`(int viewId) ` return with the constraint set will apply elevation for the specified view.                                                                                                                                                                                                                                                                                                                                                                           |
| ` HashMap<String, `[ConstraintAttribute](https://developer.android.com/reference/android/support/constraint/ConstraintAttribute)`>` | ` `[getCustomAttributeSet](https://developer.android.com/reference/android/support/constraint/ConstraintSet#getCustomAttributeSet())`() `                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| ` `[ConstraintSet.Constraint](https://developer.android.com/reference/android/support/constraint/ConstraintSet.Constraint)          | ` `[getParameters](https://developer.android.com/reference/android/support/constraint/ConstraintSet#getParameters(int))`(int mId) `                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| ` boolean`                                                                                                                          | ` `[isForceId](https://developer.android.com/reference/android/support/constraint/ConstraintSet#isForceId())`() ` Enforce id are required for all ConstraintLayout children to use ConstraintSet.                                                                                                                                                                                                                                                                                                                                                                                                    |
| ` void`                                                                                                                             | ` `[load](https://developer.android.com/reference/android/support/constraint/ConstraintSet#load(Context,%20int))`(Context context, int resourceId) ` Load a constraint set from a constraintSet.xml file.                                                                                                                                                                                                                                                                                                                                                                                            |
| ` void`                                                                                                                             | ` `[load](https://developer.android.com/reference/android/support/constraint/ConstraintSet#load(Context,%20XmlPullParser))`(Context context, XmlPullParser parser) ` Load a constraint set from a constraintSet.xml file                                                                                                                                                                                                                                                                                                                                                                             |
| ` void`                                                                                                                             | ` `[parseColorAttributes](https://developer.android.com/reference/android/support/constraint/ConstraintSet#parseColorAttributes(android.support.constraint.ConstraintSet.Constraint,%20java.lang.String))`(`[ConstraintSet.Constraint](https://developer.android.com/reference/android/support/constraint/ConstraintSet.Constraint)` set, String attributes) `                                                                                                                                                                                                                                       |
| ` void`                                                                                                                             | ` `[parseFloatAttributes](https://developer.android.com/reference/android/support/constraint/ConstraintSet#parseFloatAttributes(android.support.constraint.ConstraintSet.Constraint,%20java.lang.String))`(`[ConstraintSet.Constraint](https://developer.android.com/reference/android/support/constraint/ConstraintSet.Constraint)` set, String attributes) `                                                                                                                                                                                                                                       |
| ` void`                                                                                                                             | ` `[parseIntAttributes](https://developer.android.com/reference/android/support/constraint/ConstraintSet#parseIntAttributes(android.support.constraint.ConstraintSet.Constraint,%20java.lang.String))`(`[ConstraintSet.Constraint](https://developer.android.com/reference/android/support/constraint/ConstraintSet.Constraint)` set, String attributes) `                                                                                                                                                                                                                                           |
| ` void`                                                                                                                             | ` `[parseStringAttributes](https://developer.android.com/reference/android/support/constraint/ConstraintSet#parseStringAttributes(android.support.constraint.ConstraintSet.Constraint,%20java.lang.String))`(`[ConstraintSet.Constraint](https://developer.android.com/reference/android/support/constraint/ConstraintSet.Constraint)` set, String attributes) `                                                                                                                                                                                                                                     |
| ` void`                                                                                                                             | ` `[readFallback](https://developer.android.com/reference/android/support/constraint/ConstraintSet#readFallback(android.support.constraint.ConstraintLayout))`(`[ConstraintLayout](https://developer.android.com/reference/android/support/constraint/ConstraintLayout)` constraintLayout) ` This will copy Constraints from the ConstraintLayout if it does not have parameters                                                                                                                                                                                                                     |
| ` void`                                                                                                                             | ` `[readFallback](https://developer.android.com/reference/android/support/constraint/ConstraintSet#readFallback(android.support.constraint.ConstraintSet))`(`[ConstraintSet](https://developer.android.com/reference/android/support/constraint/ConstraintSet)` set) ` This will copy Constraints from the ConstraintSet                                                                                                                                                                                                                                                                             |
| ` void`                                                                                                                             | ` `[removeAttribute](https://developer.android.com/reference/android/support/constraint/ConstraintSet#removeAttribute(java.lang.String))`(String attributeName) `                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| ` void`                                                                                                                             | ` `[removeFromHorizontalChain](https://developer.android.com/reference/android/support/constraint/ConstraintSet#removeFromHorizontalChain(int))`(int viewId) ` Removes a view from a horizontal chain.                                                                                                                                                                                                                                                                                                                                                                                               |
| ` void`                                                                                                                             | ` `[removeFromVerticalChain](https://developer.android.com/reference/android/support/constraint/ConstraintSet#removeFromVerticalChain(int))`(int viewId) ` Removes a view from a vertical chain.                                                                                                                                                                                                                                                                                                                                                                                                     |
| ` void`                                                                                                                             | ` `[setAlpha](https://developer.android.com/reference/android/support/constraint/ConstraintSet#setAlpha(int,%20float))`(int viewId, float alpha) ` Adjust the alpha of a view.                                                                                                                                                                                                                                                                                                                                                                                                                       |
| ` void`                                                                                                                             | ` `[setApplyElevation](https://developer.android.com/reference/android/support/constraint/ConstraintSet#setApplyElevation(int,%20boolean))`(int viewId, boolean apply) ` set if elevation will be applied to the view.                                                                                                                                                                                                                                                                                                                                                                               |
| ` void`                                                                                                                             | ` `[setBarrierType](https://developer.android.com/reference/android/support/constraint/ConstraintSet#setBarrierType(int,%20int))`(int id, int type) `                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| ` void`                                                                                                                             | ` `[setColorValue](https://developer.android.com/reference/android/support/constraint/ConstraintSet#setColorValue(int,%20java.lang.String,%20int))`(int viewId, String attributeName, int value) `                                                                                                                                                                                                                                                                                                                                                                                                   |
| ` void`                                                                                                                             | ` `[setDimensionRatio](https://developer.android.com/reference/android/support/constraint/ConstraintSet#setDimensionRatio(int,%20java.lang.String))`(int viewId, String ratio) ` Constrains the views aspect ratio.                                                                                                                                                                                                                                                                                                                                                                                  |
| ` void`                                                                                                                             | ` `[setElevation](https://developer.android.com/reference/android/support/constraint/ConstraintSet#setElevation(int,%20float))`(int viewId, float elevation) ` Adjust the elevation of a view.                                                                                                                                                                                                                                                                                                                                                                                                       |
| ` void`                                                                                                                             | ` `[setFloatValue](https://developer.android.com/reference/android/support/constraint/ConstraintSet#setFloatValue(int,%20java.lang.String,%20float))`(int viewId, String attributeName, float value) `                                                                                                                                                                                                                                                                                                                                                                                               |
| ` void`                                                                                                                             | ` `[setForceId](https://developer.android.com/reference/android/support/constraint/ConstraintSet#setForceId(boolean))`(boolean forceId) ` Enforce id are required for all ConstraintLayout children to use ConstraintSet.                                                                                                                                                                                                                                                                                                                                                                            |
| ` void`                                                                                                                             | ` `[setGoneMargin](https://developer.android.com/reference/android/support/constraint/ConstraintSet#setGoneMargin(int,%20int,%20int))`(int viewId, int anchor, int value) ` Sets the gone margin.                                                                                                                                                                                                                                                                                                                                                                                                    |
| ` void`                                                                                                                             | ` `[setGuidelineBegin](https://developer.android.com/reference/android/support/constraint/ConstraintSet#setGuidelineBegin(int,%20int))`(int guidelineID, int margin) ` Set the guideline's distance form the top or left edge.                                                                                                                                                                                                                                                                                                                                                                       |
| ` void`                                                                                                                             | ` `[setGuidelineEnd](https://developer.android.com/reference/android/support/constraint/ConstraintSet#setGuidelineEnd(int,%20int))`(int guidelineID, int margin) ` Set a guideline's distance to end.                                                                                                                                                                                                                                                                                                                                                                                                |
| ` void`                                                                                                                             | ` `[setGuidelinePercent](https://developer.android.com/reference/android/support/constraint/ConstraintSet#setGuidelinePercent(int,%20float))`(int guidelineID, float ratio) ` Set a Guideline's percent.                                                                                                                                                                                                                                                                                                                                                                                             |
| ` void`                                                                                                                             | ` `[setHorizontalBias](https://developer.android.com/reference/android/support/constraint/ConstraintSet#setHorizontalBias(int,%20float))`(int viewId, float bias) ` Adjust the horizontal bias of the view (used with views constrained on left and right).                                                                                                                                                                                                                                                                                                                                          |
| ` void`                                                                                                                             | ` `[setHorizontalChainStyle](https://developer.android.com/reference/android/support/constraint/ConstraintSet#setHorizontalChainStyle(int,%20int))`(int viewId, int chainStyle) ` How the elements of the horizontal chain will be positioned.                                                                                                                                                                                                                                                                                                                                                       |
| ` void`                                                                                                                             | ` `[setHorizontalWeight](https://developer.android.com/reference/android/support/constraint/ConstraintSet#setHorizontalWeight(int,%20float))`(int viewId, float weight) ` 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                                                                                                                                                                                                                                                                          |
| ` void`                                                                                                                             | ` `[setIntValue](https://developer.android.com/reference/android/support/constraint/ConstraintSet#setIntValue(int,%20java.lang.String,%20int))`(int viewId, String attributeName, int value) `                                                                                                                                                                                                                                                                                                                                                                                                       |
| ` void`                                                                                                                             | ` `[setMargin](https://developer.android.com/reference/android/support/constraint/ConstraintSet#setMargin(int,%20int,%20int))`(int viewId, int anchor, int value) ` Sets the margin.                                                                                                                                                                                                                                                                                                                                                                                                                 |
| ` void`                                                                                                                             | ` `[setRotation](https://developer.android.com/reference/android/support/constraint/ConstraintSet#setRotation(int,%20float))`(int viewId, float rotation) ` Adjust the post-layout rotation about the Z axis of a view.                                                                                                                                                                                                                                                                                                                                                                              |
| ` void`                                                                                                                             | ` `[setRotationX](https://developer.android.com/reference/android/support/constraint/ConstraintSet#setRotationX(int,%20float))`(int viewId, float rotationX) ` Adjust the post-layout rotation about the X axis of a view.                                                                                                                                                                                                                                                                                                                                                                           |
| ` void`                                                                                                                             | ` `[setRotationY](https://developer.android.com/reference/android/support/constraint/ConstraintSet#setRotationY(int,%20float))`(int viewId, float rotationY) ` Adjust the post-layout rotation about the Y axis of a view.                                                                                                                                                                                                                                                                                                                                                                           |
| ` void`                                                                                                                             | ` `[setScaleX](https://developer.android.com/reference/android/support/constraint/ConstraintSet#setScaleX(int,%20float))`(int viewId, float scaleX) ` Adjust the post-layout scale in X of a view.                                                                                                                                                                                                                                                                                                                                                                                                   |
| ` void`                                                                                                                             | ` `[setScaleY](https://developer.android.com/reference/android/support/constraint/ConstraintSet#setScaleY(int,%20float))`(int viewId, float scaleY) ` Adjust the post-layout scale in Y of a view.                                                                                                                                                                                                                                                                                                                                                                                                   |
| ` void`                                                                                                                             | ` `[setStringValue](https://developer.android.com/reference/android/support/constraint/ConstraintSet#setStringValue(int,%20java.lang.String,%20java.lang.String))`(int viewId, String attributeName, String value) `                                                                                                                                                                                                                                                                                                                                                                                 |
| ` void`                                                                                                                             | ` `[setTransformPivot](https://developer.android.com/reference/android/support/constraint/ConstraintSet#setTransformPivot(int,%20float,%20float))`(int viewId, float transformPivotX, float transformPivotY) ` Set X,Y location of the pivot point around which the view will rotate and scale.                                                                                                                                                                                                                                                                                                      |
| ` void`                                                                                                                             | ` `[setTransformPivotX](https://developer.android.com/reference/android/support/constraint/ConstraintSet#setTransformPivotX(int,%20float))`(int viewId, float transformPivotX) ` Set X location of the pivot point around which the view will rotate and scale.                                                                                                                                                                                                                                                                                                                                      |
| ` void`                                                                                                                             | ` `[setTransformPivotY](https://developer.android.com/reference/android/support/constraint/ConstraintSet#setTransformPivotY(int,%20float))`(int viewId, float transformPivotY) ` Set Y location of the pivot point around which the view will rotate and scale.                                                                                                                                                                                                                                                                                                                                      |
| ` void`                                                                                                                             | ` `[setTranslation](https://developer.android.com/reference/android/support/constraint/ConstraintSet#setTranslation(int,%20float,%20float))`(int viewId, float translationX, float translationY) ` Adjust the post-layout translation of a view.                                                                                                                                                                                                                                                                                                                                                     |
| ` void`                                                                                                                             | ` `[setTranslationX](https://developer.android.com/reference/android/support/constraint/ConstraintSet#setTranslationX(int,%20float))`(int viewId, float translationX) ` Adjust the post-layout X translation of a view.                                                                                                                                                                                                                                                                                                                                                                              |
| ` void`                                                                                                                             | ` `[setTranslationY](https://developer.android.com/reference/android/support/constraint/ConstraintSet#setTranslationY(int,%20float))`(int viewId, float translationY) ` Adjust the post-layout Y translation of a view.                                                                                                                                                                                                                                                                                                                                                                              |
| ` void`                                                                                                                             | ` `[setTranslationZ](https://developer.android.com/reference/android/support/constraint/ConstraintSet#setTranslationZ(int,%20float))`(int viewId, float translationZ) ` Adjust the translation in Z of a view.                                                                                                                                                                                                                                                                                                                                                                                       |
| ` void`                                                                                                                             | ` `[setVerticalBias](https://developer.android.com/reference/android/support/constraint/ConstraintSet#setVerticalBias(int,%20float))`(int viewId, float bias) ` Adjust the vertical bias of the view (used with views constrained on left and right).                                                                                                                                                                                                                                                                                                                                                |
| ` void`                                                                                                                             | ` `[setVerticalChainStyle](https://developer.android.com/reference/android/support/constraint/ConstraintSet#setVerticalChainStyle(int,%20int))`(int viewId, int chainStyle) ` How the elements of the vertical chain will be positioned.                                                                                                                                                                                                                                                                                                                                                             |
| ` void`                                                                                                                             | ` `[setVerticalWeight](https://developer.android.com/reference/android/support/constraint/ConstraintSet#setVerticalWeight(int,%20float))`(int viewId, float weight) ` 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                                                                                                                                                                                                                                                                                |
| ` void`                                                                                                                             | ` `[setVisibility](https://developer.android.com/reference/android/support/constraint/ConstraintSet#setVisibility(int,%20int))`(int viewId, int visibility) ` Adjust the visibility of a view.                                                                                                                                                                                                                                                                                                                                                                                                       |

| ### Inherited methods |
|-----------------------|---|
| From class` java.lang.Object ` |-------------------|-------------------------------| | ` Object`         | ` clone() `                   | | ` boolean`        | ` equals(Object arg0) `       | | ` void`           | ` finalize() `                | | ` final Class<?>` | ` getClass() `                | | ` int`            | ` hashCode() `                | | ` final void`     | ` notify() `                  | | ` final void`     | ` notifyAll() `               | | ` String`         | ` toString() `                | | ` final void`     | ` wait(long arg0, int arg1) ` | | ` final void`     | ` wait(long arg0) `           | | ` final void`     | ` wait() `                    | ||

## Constants

### BASELINE

```
public static final int BASELINE
```

The baseline of the text in a view.

<br />

Constant Value: 5 (0x00000005)  

### BOTTOM

```
public static final int BOTTOM
```

The bottom side of a view.

<br />

Constant Value: 4 (0x00000004)  

### END

```
public static final int END
```

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

<br />

Constant Value: 7 (0x00000007)  

### HORIZONTAL_GUIDELINE

```
public static final int HORIZONTAL_GUIDELINE
```

Used to create a horizontal create guidelines.

<br />

Constant Value: 0 (0x00000000)  

### LEFT

```
public static final int LEFT
```

The left side of a view.

<br />

Constant Value: 1 (0x00000001)  

### MATCH_CONSTRAINT

```
public static final int MATCH_CONSTRAINT
```

Dimension will be controlled by constraints

<br />

Constant Value: 0 (0x00000000)  

### PARENT_ID

```
public static final int PARENT_ID
```

References the id of the parent. Used in:

- [connect(int, int, int, int, int)](https://developer.android.com/reference/android/support/constraint/ConstraintSet#connect(int,%20int,%20int,%20int,%20int))
- [center(int, int, int, int, int, int, int, float)](https://developer.android.com/reference/android/support/constraint/ConstraintSet#center(int,%20int,%20int,%20int,%20int,%20int,%20int,%20float))

<br />

<br />

Constant Value: 0 (0x00000000)  

### RIGHT

```
public static final int RIGHT
```

The right side of a view.

<br />

Constant Value: 2 (0x00000002)  

### START

```
public static final int START
```

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

<br />

Constant Value: 6 (0x00000006)  

### TOP

```
public static final int TOP
```

The top of a view.

<br />

Constant Value: 3 (0x00000003)  

### UNSET

```
public static final int UNSET
```

Used to indicate a parameter is cleared or not set

<br />

Constant Value: -1 (0xffffffff)  

### VERTICAL_GUIDELINE

```
public static final int VERTICAL_GUIDELINE
```

Used to create a vertical create guidelines. see[create(int, int)](https://developer.android.com/reference/android/support/constraint/ConstraintSet#create(int,%20int))

<br />

Constant Value: 1 (0x00000001)

## Fields

### CHAIN_PACKED

```
public static final int CHAIN_PACKED
```

Chain packed style

<br />

### CHAIN_SPREAD

```
public static final int CHAIN_SPREAD
```

Chain spread style

<br />

### CHAIN_SPREAD_INSIDE

```
public static final int CHAIN_SPREAD_INSIDE
```

Chain spread inside style

<br />

### GONE

```
public static final int GONE
```

This view is gone, and will not take any space for layout purposes. Use with[setVisibility(int, int)](https://developer.android.com/reference/android/support/constraint/ConstraintSet#setVisibility(int,%20int))and[`android:visibility`.](https://developer.android.com/reference/android/support/constraint/ConstraintSet#attr_android:visibility)

<br />

[](https://developer.android.com/reference/android/support/constraint/ConstraintSet#attr_android:visibility)
[### HORIZONTAL
```
public static final int HORIZONTAL
```
The horizontal orientation.
<br />](https://developer.android.com/reference/android/support/constraint/ConstraintSet#attr_android:visibility)  
[### INVISIBLE
```
public static final int INVISIBLE
```](https://developer.android.com/reference/android/support/constraint/ConstraintSet#attr_android:visibility)

[This view is invisible, but it still takes up space for layout purposes. Use with](https://developer.android.com/reference/android/support/constraint/ConstraintSet#attr_android:visibility)[setVisibility(int, int)](https://developer.android.com/reference/android/support/constraint/ConstraintSet#setVisibility(int,%20int))and[`android:visibility`.](https://developer.android.com/reference/android/support/constraint/ConstraintSet#attr_android:visibility)

<br />

[](https://developer.android.com/reference/android/support/constraint/ConstraintSet#attr_android:visibility)
[### MATCH_CONSTRAINT_SPREAD
```
public static final int MATCH_CONSTRAINT_SPREAD
```
Calculate the size of a view in 0 dp by reducing the constrains gaps as much as possible
<br />
### MATCH_CONSTRAINT_WRAP
```
public static final int MATCH_CONSTRAINT_WRAP
```
How to calculate the size of a view in 0 dp by using its wrap_content size
<br />
### VERTICAL
```
public static final int VERTICAL
```
The vertical orientation.
<br />](https://developer.android.com/reference/android/support/constraint/ConstraintSet#attr_android:visibility)  
[### VISIBLE
```
public static final int VISIBLE
```](https://developer.android.com/reference/android/support/constraint/ConstraintSet#attr_android:visibility)

[This view is visible. Use with](https://developer.android.com/reference/android/support/constraint/ConstraintSet#attr_android:visibility)[setVisibility(int, int)](https://developer.android.com/reference/android/support/constraint/ConstraintSet#setVisibility(int,%20int))and[`android:visibility`.](https://developer.android.com/reference/android/support/constraint/ConstraintSet#attr_android:visibility)

<br />

[](https://developer.android.com/reference/android/support/constraint/ConstraintSet#attr_android:visibility)
[### WRAP_CONTENT
```
public static final int WRAP_CONTENT
```
Dimension will set by the view's content
<br />
## Public constructors
### ConstraintSet
```
public ConstraintSet ()
```
<br />
<br />
## Public methods
### addColorAttributes
```
public void addColorAttributes (String... attributeName)
```
<br />
<br />
| Parameters ||
|-----------------|-----------------|
| `attributeName` | `String` <br /> |
### addFloatAttributes
```
public void addFloatAttributes (String... attributeName)
```
<br />
<br />
| Parameters ||
|-----------------|-----------------|
| `attributeName` | `String` <br /> |
### addIntAttributes
```
public void addIntAttributes (String... attributeName)
```
<br />
<br />
| Parameters ||
|-----------------|-----------------|
| `attributeName` | `String` <br /> |
### addStringAttributes
```
public void addStringAttributes (String... attributeName)
```
<br />
<br />
| Parameters ||
|-----------------|-----------------|
| `attributeName` | `String` <br /> |
### addToHorizontalChain
```
public void addToHorizontalChain (int viewId,
int leftId,
int rightId)
```
Adds a view to a horizontal chain.
<br />
| Parameters ||
|-----------|------------------------------------------|
| `viewId` | `int`: view to add <br /> |
| `leftId` | `int`: view in chain to the left <br /> |
| `rightId` | `int`: view in chain to the right <br /> |
### addToHorizontalChainRTL
```
public void addToHorizontalChainRTL (int viewId,
int leftId,
int rightId)
```
Adds a view to a horizontal chain.
<br />
| Parameters ||
|-----------|--------------------------------------|
| `viewId` | `int`: view to add <br /> |
| `leftId` | `int`: view to the start side <br /> |
| `rightId` | `int`: view to the end side <br /> |
### addToVerticalChain
```
public void addToVerticalChain (int viewId,
int topId,
int bottomId)
```
Adds a view to a vertical chain.
<br />
| Parameters ||
|------------|-----------------------------------------------|
| `viewId` | `int`: view to add to a vertical chain <br /> |
| `topId` | `int`: view above. <br /> |
| `bottomId` | `int`: view below <br /> |](https://developer.android.com/reference/android/support/constraint/ConstraintSet#attr_android:visibility)  
[### applyCustomAttributes](https://developer.android.com/reference/android/support/constraint/ConstraintSet#attr_android:visibility)

```
public void applyCustomAttributes (ConstraintLayout constraintLayout)
```

Apply custom attributes alone

<br />

### applyTo

```
public void applyTo (ConstraintLayout constraintLayout)
```

Apply the constraints to a ConstraintLayout.

<br />

|                          Parameters                           ||
|--------------------|-------------------------------------------|
| `constraintLayout` | `ConstraintLayout`: to be modified <br /> |

### applyToHelper

```
public void applyToHelper (ConstraintHelper helper, 
                ConstraintWidget child, 
                ConstraintLayout.LayoutParams layoutParams, 
                 mapIdToWidget)
```

Apply Layout to Helper widget

<br />

### applyToLayoutParams

```
public void applyToLayoutParams (int id, 
                ConstraintLayout.LayoutParams layoutParams)
```

Fill in a ConstraintLayout LayoutParam based on the id.

<br />

|                                    Parameters                                     ||
|----------------|-------------------------------------------------------------------|
| `id`           | `int`: Id of the view <br />                                      |
| `layoutParams` | `ConstraintLayout.LayoutParams`: LayoutParams to be filled <br /> |

### applyToWithoutCustom

```
public void applyToWithoutCustom (ConstraintLayout constraintLayout)
```

Apply the constraints to a ConstraintLayout.

<br />

|                          Parameters                           ||
|--------------------|-------------------------------------------|
| `constraintLayout` | `ConstraintLayout`: to be modified <br /> |

### center

```
public void center (int centerID, 
                int firstID, 
                int firstSide, 
                int firstMargin, 
                int secondId, 
                int secondSide, 
                int secondMargin, 
                float bias)
```

Center widget between the other two widgets. (for sides see: {@link #TOP, {@link #BOTTOM}, {@link #START, {@link #END}, {@link #LEFT, {@link #RIGHT}) Note, sides must be all vertical or horizontal sides.

<br />

|                                              Parameters                                               ||
|----------------|---------------------------------------------------------------------------------------|
| `centerID`     | `int`: ID of the widget to be centered <br />                                         |
| `firstID`      | `int`: ID of the first widget to connect the left or top of the widget to <br />      |
| `firstSide`    | `int`: the side of the widget to connect to <br />                                    |
| `firstMargin`  | `int`: the connection margin <br />                                                   |
| `secondId`     | `int`: the ID of the second widget to connect to right or top of the widget to <br /> |
| `secondSide`   | `int`: the side of the widget to connect to <br />                                    |
| `secondMargin` | `int`: the connection margin <br />                                                   |
| `bias`         | `float`: the ratio between two connections <br />                                     |

### centerHorizontally

```
public void centerHorizontally (int centerID, 
                int leftId, 
                int leftSide, 
                int leftMargin, 
                int rightId, 
                int rightSide, 
                int rightMargin, 
                float bias)
```

Centers the widget horizontally to the left and right side on another widgets sides. (for sides see: {@link #START, {@link #END}, {@link #LEFT, {@link #RIGHT})

<br />

|                                                 Parameters                                                  ||
|---------------|----------------------------------------------------------------------------------------------|
| `centerID`    | `int`: ID of widget to be centered <br />                                                    |
| `leftId`      | `int`: The Id of the widget on the left side <br />                                          |
| `leftSide`    | `int`: The side of the leftId widget to connect to <br />                                    |
| `leftMargin`  | `int`: The margin on the left side <br />                                                    |
| `rightId`     | `int`: The Id of the widget on the right side <br />                                         |
| `rightSide`   | `int`: The side of the rightId widget to connect to <br />                                   |
| `rightMargin` | `int`: The margin on the right side <br />                                                   |
| `bias`        | `float`: The ratio of the space on the left vs. right sides 0.5 is centered (default) <br /> |

### centerHorizontally

```
public void centerHorizontally (int viewId, 
                int toView)
```

Centers the view horizontally relative to toView's position.

<br />

|                        Parameters                         ||
|----------|-------------------------------------------------|
| `viewId` | `int`: ID of view to center Horizontally <br /> |
| `toView` | `int`: ID of view to center on (or in) <br />   |

### centerHorizontallyRtl

```
public void centerHorizontallyRtl (int viewId, 
                int toView)
```

Centers the view horizontally relative to toView's position.

<br />

|                        Parameters                         ||
|----------|-------------------------------------------------|
| `viewId` | `int`: ID of view to center Horizontally <br /> |
| `toView` | `int`: ID of view to center on (or in) <br />   |

### centerHorizontallyRtl

```
public void centerHorizontallyRtl (int centerID, 
                int startId, 
                int startSide, 
                int startMargin, 
                int endId, 
                int endSide, 
                int endMargin, 
                float bias)
```

Centers the widgets horizontally to the left and right side on another widgets sides. (for sides see:[START](https://developer.android.com/reference/android/support/constraint/ConstraintSet#START),[END](https://developer.android.com/reference/android/support/constraint/ConstraintSet#END),[LEFT](https://developer.android.com/reference/android/support/constraint/ConstraintSet#LEFT),[RIGHT](https://developer.android.com/reference/android/support/constraint/ConstraintSet#RIGHT))

<br />

|                                                Parameters                                                ||
|---------------|-------------------------------------------------------------------------------------------|
| `centerID`    | `int`: ID of widget to be centered <br />                                                 |
| `startId`     | `int`: The Id of the widget on the start side (left in non rtl languages) <br />          |
| `startSide`   | `int`: The side of the startId widget to connect to <br />                                |
| `startMargin` | `int`: The margin on the start side <br />                                                |
| `endId`       | `int`: The Id of the widget on the start side (left in non rtl languages) <br />          |
| `endSide`     | `int`: The side of the endId widget to connect to <br />                                  |
| `endMargin`   | `int`: The margin on the end side <br />                                                  |
| `bias`        | `float`: The ratio of the space on the start vs end side 0.5 is centered (default) <br /> |

### centerVertically

```
public void centerVertically (int viewId, 
                int toView)
```

Centers the view vertically relative to toView's position.

<br />

|                        Parameters                         ||
|----------|-------------------------------------------------|
| `viewId` | `int`: ID of view to center Horizontally <br /> |
| `toView` | `int`: ID of view to center on (or in) <br />   |

### centerVertically

```
public void centerVertically (int centerID, 
                int topId, 
                int topSide, 
                int topMargin, 
                int bottomId, 
                int bottomSide, 
                int bottomMargin, 
                float bias)
```

Centers the widgets Vertically to the top and bottom side on another widgets sides. (for sides see: {@link #TOP, {@link #BOTTOM})

<br />

|                                                  Parameters                                                  ||
|----------------|----------------------------------------------------------------------------------------------|
| `centerID`     | `int`: ID of widget to be centered <br />                                                    |
| `topId`        | `int`: The Id of the widget on the top side <br />                                           |
| `topSide`      | `int`: The side of the leftId widget to connect to <br />                                    |
| `topMargin`    | `int`: The margin on the top side <br />                                                     |
| `bottomId`     | `int`: The Id of the widget on the bottom side <br />                                        |
| `bottomSide`   | `int`: The side of the bottomId widget to connect to <br />                                  |
| `bottomMargin` | `int`: The margin on the bottom side <br />                                                  |
| `bias`         | `float`: The ratio of the space on the top vs. bottom sides 0.5 is centered (default) <br /> |

### clear

```
public void clear (int viewId, 
                int anchor)
```

Remove a constraint from this view.

<br />

|                          Parameters                          ||
|----------|----------------------------------------------------|
| `viewId` | `int`: ID of view to center on (or in) <br />      |
| `anchor` | `int`: the Anchor to remove constraint from <br /> |

### clear

```
public void clear (int viewId)
```

Remove all constraints from this view.

<br />

|                           Parameters                            ||
|----------|-------------------------------------------------------|
| `viewId` | `int`: ID of view to remove all connections to <br /> |

### clone

```
public void clone (Context context, 
                int constraintLayoutId)
```

Copy the constraints from a layout.

<br />

|                                  Parameters                                  ||
|----------------------|--------------------------------------------------------|
| `context`            | `Context`: the context for the layout inflation <br /> |
| `constraintLayoutId` | `int`: the id of the layout file <br />                |

### clone

```
public void clone (ConstraintLayout constraintLayout)
```

Copy the layout parameters of a ConstraintLayout.

<br />

|                                    Parameters                                    ||
|--------------------|--------------------------------------------------------------|
| `constraintLayout` | `ConstraintLayout`: The ConstraintLayout to be copied <br /> |

### clone

```
public void clone (Constraints constraints)
```

Copy the layout parameters of a ConstraintLayout.

<br />

|                               Parameters                               ||
|---------------|---------------------------------------------------------|
| `constraints` | `Constraints`: The ConstraintLayout to be copied <br /> |

### clone

```
public void clone (ConstraintSet set)
```

Copy the constraints from a layout.

<br />

|                      Parameters                       ||
|-------|------------------------------------------------|
| `set` | `ConstraintSet`: constraint set to copy <br /> |

### connect

```
public void connect (int startID, 
                int startSide, 
                int endID, 
                int endSide, 
                int margin)
```

Create a constraint between two widgets. (for sides see: {@link #TOP, {@link #BOTTOM}, {@link #START, {@link #END}, {@link #LEFT, {@link #RIGHT}, {@link #BASELINE})

<br />

|                                  Parameters                                  ||
|-------------|-----------------------------------------------------------------|
| `startID`   | `int`: the ID of the widget to be constrained <br />            |
| `startSide` | `int`: the side of the widget to constrain <br />               |
| `endID`     | `int`: the id of the widget to constrain to <br />              |
| `endSide`   | `int`: the side of widget to constrain to <br />                |
| `margin`    | `int`: the margin to constrain (margin must be positive) <br /> |

### connect

```
public void connect (int startID, 
                int startSide, 
                int endID, 
                int endSide)
```

Create a constraint between two widgets. (for sides see: {@link #TOP, {@link #BOTTOM}, {@link #START, {@link #END}, {@link #LEFT, {@link #RIGHT}, {@link #BASELINE})

<br />

|                            Parameters                             ||
|-------------|------------------------------------------------------|
| `startID`   | `int`: the ID of the widget to be constrained <br /> |
| `startSide` | `int`: the side of the widget to constrain <br />    |
| `endID`     | `int`: the id of the widget to constrain to <br />   |
| `endSide`   | `int`: the side of widget to constrain to <br />     |

### constrainCircle

```
public void constrainCircle (int viewId, 
                int id, 
                int radius, 
                float angle)
```

Constrain the view on a circle constraint

<br />

|                           Parameters                            ||
|----------|-------------------------------------------------------|
| `viewId` | `int`: ID of the view we constrain <br />             |
| `id`     | `int`: ID of the view we constrain relative to <br /> |
| `radius` | `int`: the radius of the circle in degrees <br />     |
| `angle`  | `float`: the angle <br />                             |

### constrainDefaultHeight

```
public void constrainDefaultHeight (int viewId, 
                int height)
```

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

<br />

|                                  Parameters                                   ||
|----------|---------------------------------------------------------------------|
| `viewId` | `int`: ID of view to adjust its matchConstraintDefaultHeight <br /> |
| `height` | `int`: MATCH_CONSTRAINT_WRAP or MATCH_CONSTRAINT_SPREAD <br />      |

### constrainDefaultWidth

```
public void constrainDefaultWidth (int viewId, 
                int width)
```

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

<br />

|                                  Parameters                                  ||
|----------|--------------------------------------------------------------------|
| `viewId` | `int`: ID of view to adjust its matchConstraintDefaultWidth <br /> |
| `width`  | `int`: SPREAD or WRAP <br />                                       |

### constrainHeight

```
public void constrainHeight (int viewId, 
                int height)
```

Sets the height of the view. It can be a dimension,[WRAP_CONTENT](https://developer.android.com/reference/android/support/constraint/ConstraintSet#WRAP_CONTENT)or[MATCH_CONSTRAINT](https://developer.android.com/reference/android/support/constraint/ConstraintSet#MATCH_CONSTRAINT).

<br />

|                       Parameters                        ||
|----------|-----------------------------------------------|
| `viewId` | `int`: ID of view to adjust its height <br /> |
| `height` | `int`: the height of the view <br />          |

### constrainMaxHeight

```
public void constrainMaxHeight (int viewId, 
                int height)
```

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

<br />

|                          Parameters                          ||
|----------|----------------------------------------------------|
| `viewId` | `int`: ID of view to adjust it height <br />       |
| `height` | `int`: the maximum height of the constraint <br /> |

### constrainMaxWidth

```
public void constrainMaxWidth (int viewId, 
                int width)
```

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

<br />

|                         Parameters                          ||
|----------|---------------------------------------------------|
| `viewId` | `int`: ID of view to adjust its max height <br /> |
| `width`  | `int`: the maximum width of the view <br />       |

### constrainMinHeight

```
public void constrainMinHeight (int viewId, 
                int height)
```

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

<br />

|                         Parameters                          ||
|----------|---------------------------------------------------|
| `viewId` | `int`: ID of view to adjust its min height <br /> |
| `height` | `int`: the minimum height of the view <br />      |

### constrainMinWidth

```
public void constrainMinWidth (int viewId, 
                int width)
```

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

<br />

|                         Parameters                          ||
|----------|---------------------------------------------------|
| `viewId` | `int`: ID of view to adjust its min height <br /> |
| `width`  | `int`: the minimum width of the view <br />       |

### constrainPercentHeight

```
public void constrainPercentHeight (int viewId, 
                float percent)
```

Sets the height of the view as a percentage of the parent.

<br />

### constrainPercentWidth

```
public void constrainPercentWidth (int viewId, 
                float percent)
```

Sets the width of the view as a percentage of the parent.

<br />

### constrainWidth

```
public void constrainWidth (int viewId, 
                int width)
```

Sets the width of the view. It can be a dimension,[WRAP_CONTENT](https://developer.android.com/reference/android/support/constraint/ConstraintSet#WRAP_CONTENT)or[MATCH_CONSTRAINT](https://developer.android.com/reference/android/support/constraint/ConstraintSet#MATCH_CONSTRAINT).

<br />

|                       Parameters                       ||
|----------|----------------------------------------------|
| `viewId` | `int`: ID of view to adjust its width <br /> |
| `width`  | `int`: the width of the view <br />          |

### create

```
public void create (int guidelineID, 
                int orientation)
```

Creates a ConstraintLayout virtual object. Currently only horizontal or vertical GuideLines.

<br />

|                          Parameters                           ||
|---------------|------------------------------------------------|
| `guidelineID` | `int`: ID of guideline to create <br />        |
| `orientation` | `int`: the Orientation of the guideline <br /> |

### createBarrier

```
public void createBarrier (int id, 
                int direction, 
                int margin, 
                int... referenced)
```

Creates a ConstraintLayout Barrier object.

<br />

|                              Parameters                              ||
|-------------|---------------------------------------------------------|
| `direction` | `int`: Barrier.{LEFT,RIGHT,TOP,BOTTOM,START,END} <br /> |
| `margin`    | `int` <br />                                            |

### createHorizontalChain

```
public void createHorizontalChain (int leftId, 
                int leftSide, 
                int rightId, 
                int rightSide, 
                int[] chainIds, 
                float[] weights, 
                int style)
```

Spaces a set of widgets horizontal between the view startID and endId. Widgets can be spaced with weights. (for sides see: {@link #START, {@link #END}, {@link #LEFT, {@link #RIGHT}

<br />

|                                       Parameters                                       ||
|-------------|---------------------------------------------------------------------------|
| `leftId`    | `int`: The id of the widget to connect to or PARENT_ID <br />             |
| `leftSide`  | `int`: the side of the start to connect to <br />                         |
| `rightId`   | `int`: The id of the widget to connect to or PARENT_ID <br />             |
| `rightSide` | `int`: the side of the right to connect to <br />                         |
| `chainIds`  | `int`: The widgets in the chain <br />                                    |
| `weights`   | `float`: The weight to assign to each element in the chain or null <br /> |
| `style`     | `int`: The type of chain <br />                                           |

### createHorizontalChainRtl

```
public void createHorizontalChainRtl (int startId, 
                int startSide, 
                int endId, 
                int endSide, 
                int[] chainIds, 
                float[] weights, 
                int style)
```

Spaces a set of widgets horizontal between the view startID and endId. Widgets can be spaced with weights. (for sides see: {@link #START, {@link #END}, {@link #LEFT, {@link #RIGHT})

<br />

|                                       Parameters                                       ||
|-------------|---------------------------------------------------------------------------|
| `startId`   | `int`: The id of the widget to connect to or PARENT_ID <br />             |
| `startSide` | `int`: the side of the start to connect to <br />                         |
| `endId`     | `int`: The id of the widget to connect to or PARENT_ID <br />             |
| `endSide`   | `int`: the side of the end to connect to <br />                           |
| `chainIds`  | `int`: The widgets in the chain <br />                                    |
| `weights`   | `float`: The weight to assign to each element in the chain or null <br /> |
| `style`     | `int`: The type of chain <br />                                           |

### createVerticalChain

```
public void createVerticalChain (int topId, 
                int topSide, 
                int bottomId, 
                int bottomSide, 
                int[] chainIds, 
                float[] weights, 
                int style)
```

Spaces a set of widgets vertically between the view topId and bottomId. Widgets can be spaced with weights. (for sides see: {@link #TOP, {@link #BOTTOM})

<br />

|                                 Parameters                                  ||
|--------------|---------------------------------------------------------------|
| `topId`      | `int`: The id of the widget to connect to or PARENT_ID <br /> |
| `topSide`    | `int`: the side of the start to connect to <br />             |
| `bottomId`   | `int`: The id of the widget to connect to or PARENT_ID <br /> |
| `bottomSide` | `int`: the side of the right to connect to <br />             |
| `chainIds`   | `int`: widgets to use as a chain <br />                       |
| `weights`    | `float`: can be null <br />                                   |
| `style`      | `int`: set the style of the chain <br />                      |

### getApplyElevation

```
public boolean getApplyElevation (int viewId)
```

return with the constraint set will apply elevation for the specified view.

<br />

|       Parameters       ||
|----------|--------------|
| `viewId` | `int` <br /> |

|                                       Returns                                       ||
|-----------|--------------------------------------------------------------------------|
| `boolean` | true if the elevation will be set on this view (default is false) <br /> |

### getCustomAttributeSet

```
public HashMap<String, ConstraintAttribute> getCustomAttributeSet ()
```

<br />

<br />

|                                                                  Returns                                                                   ||
|------------------------------------------------------------------------------------------------------------------------------------|--------|
| `HashMap<String, `[ConstraintAttribute](https://developer.android.com/reference/android/support/constraint/ConstraintAttribute)`>` | <br /> |

### getParameters

```
public ConstraintSet.Constraint getParameters (int mId)
```

<br />

<br />

|     Parameters      ||
|-------|--------------|
| `mId` | `int` <br /> |

|                                                             Returns                                                             ||
|-------------------------------------------------------------------------------------------------------------------------|--------|
| [ConstraintSet.Constraint](https://developer.android.com/reference/android/support/constraint/ConstraintSet.Constraint) | <br /> |

### isForceId

```
public boolean isForceId ()
```

Enforce id are required for all ConstraintLayout children to use ConstraintSet. default = true;

<br />

|      Returns      ||
|-----------|--------|
| `boolean` | <br /> |

### load

```
public void load (Context context, 
                int resourceId)
```

Load a constraint set from a constraintSet.xml file. Note. Do NOT use this to load a layout file. It will fail silently as there is no efficient way to differentiate.

<br />

|                          Parameters                           ||
|--------------|-------------------------------------------------|
| `context`    | `Context`: the context for the inflation <br /> |
| `resourceId` | `int`: id of xml file in res/xml/ <br />        |

### load

```
public void load (Context context, 
                XmlPullParser parser)
```

Load a constraint set from a constraintSet.xml file

<br />

|                          Parameters                           ||
|-----------|----------------------------------------------------|
| `context` | `Context`: the context for the inflation <br />    |
| `parser`  | `XmlPullParser`: id of xml file in res/xml/ <br /> |

### parseColorAttributes

```
public void parseColorAttributes (ConstraintSet.Constraint set, 
                String attributes)
```

<br />

<br />

|                   Parameters                    ||
|--------------|-----------------------------------|
| `set`        | `ConstraintSet.Constraint` <br /> |
| `attributes` | `String` <br />                   |

### parseFloatAttributes

```
public void parseFloatAttributes (ConstraintSet.Constraint set, 
                String attributes)
```

<br />

<br />

|                   Parameters                    ||
|--------------|-----------------------------------|
| `set`        | `ConstraintSet.Constraint` <br /> |
| `attributes` | `String` <br />                   |

### parseIntAttributes

```
public void parseIntAttributes (ConstraintSet.Constraint set, 
                String attributes)
```

<br />

<br />

|                   Parameters                    ||
|--------------|-----------------------------------|
| `set`        | `ConstraintSet.Constraint` <br /> |
| `attributes` | `String` <br />                   |

### parseStringAttributes

```
public void parseStringAttributes (ConstraintSet.Constraint set, 
                String attributes)
```

<br />

<br />

|                   Parameters                    ||
|--------------|-----------------------------------|
| `set`        | `ConstraintSet.Constraint` <br /> |
| `attributes` | `String` <br />                   |

### readFallback

```
public void readFallback (ConstraintLayout constraintLayout)
```

This will copy Constraints from the ConstraintLayout if it does not have parameters

<br />

### readFallback

```
public void readFallback (ConstraintSet set)
```

This will copy Constraints from the ConstraintSet

<br />

### removeAttribute

```
public void removeAttribute (String attributeName)
```

<br />

<br />

|            Parameters            ||
|-----------------|-----------------|
| `attributeName` | `String` <br /> |

### removeFromHorizontalChain

```
public void removeFromHorizontalChain (int viewId)
```

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

<br />

|                   Parameters                   ||
|----------|--------------------------------------|
| `viewId` | `int`: the view to be removed <br /> |

### removeFromVerticalChain

```
public void removeFromVerticalChain (int viewId)
```

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.

<br />

|                   Parameters                   ||
|----------|--------------------------------------|
| `viewId` | `int`: the view to be removed <br /> |

### setAlpha

```
public void setAlpha (int viewId, 
                float alpha)
```

Adjust the alpha of a view.

<br />

|                        Parameters                         ||
|----------|-------------------------------------------------|
| `viewId` | `int`: ID of view to adjust the vertical <br /> |
| `alpha`  | `float`: the alpha <br />                       |

### setApplyElevation

```
public void setApplyElevation (int viewId, 
                boolean apply)
```

set if elevation will be applied to the view. Elevation logic is based on style and animation. By default it is not used because it would lead to unexpected results.

<br />

|                                       Parameters                                       ||
|----------|------------------------------------------------------------------------------|
| `viewId` | `int` <br />                                                                 |
| `apply`  | `boolean`: true if this constraint set applies elevation to this view <br /> |

### setBarrierType

```
public void setBarrierType (int id, 
                int type)
```

<br />

<br />

|      Parameters      ||
|--------|--------------|
| `id`   | `int` <br /> |
| `type` | `int` <br /> |

### setColorValue

```
public void setColorValue (int viewId, 
                String attributeName, 
                int value)
```

<br />

<br />

|            Parameters            ||
|-----------------|-----------------|
| `viewId`        | `int` <br />    |
| `attributeName` | `String` <br /> |
| `value`         | `int` <br />    |

### setDimensionRatio

```
public void setDimensionRatio (int viewId, 
                String ratio)
```

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

<br />

|                                  Parameters                                  ||
|----------|--------------------------------------------------------------------|
| `viewId` | `int`: ID of view to constrain <br />                              |
| `ratio`  | `String`: The ratio of the width to height (width / height) <br /> |

### setElevation

```
public void setElevation (int viewId, 
                float elevation)
```

Adjust the elevation of a view.

<br />

|                          Parameters                           ||
|-------------|--------------------------------------------------|
| `viewId`    | `int`: ID of view to adjust the elevation <br /> |
| `elevation` | `float`: the elevation <br />                    |

### setFloatValue

```
public void setFloatValue (int viewId, 
                String attributeName, 
                float value)
```

<br />

<br />

|            Parameters            ||
|-----------------|-----------------|
| `viewId`        | `int` <br />    |
| `attributeName` | `String` <br /> |
| `value`         | `float` <br />  |

### setForceId

```
public void setForceId (boolean forceId)
```

Enforce id are required for all ConstraintLayout children to use ConstraintSet. default = true;

<br />

### setGoneMargin

```
public void setGoneMargin (int viewId, 
                int anchor, 
                int value)
```

Sets the gone margin.

<br />

|                         Parameters                         ||
|----------|--------------------------------------------------|
| `viewId` | `int`: ID of view to adjust the margin on <br /> |
| `anchor` | `int`: The side to adjust the margin on <br />   |
| `value`  | `int`: The new value for the margin <br />       |

### setGuidelineBegin

```
public void setGuidelineBegin (int guidelineID, 
                int margin)
```

Set the guideline's distance form the top or left edge.

<br />

|                            Parameters                             ||
|---------------|----------------------------------------------------|
| `guidelineID` | `int`: ID of the guideline <br />                  |
| `margin`      | `int`: the distance to the top or left edge <br /> |

### setGuidelineEnd

```
public void setGuidelineEnd (int guidelineID, 
                int margin)
```

Set a guideline's distance to end.

<br />

|                                    Parameters                                    ||
|---------------|-------------------------------------------------------------------|
| `guidelineID` | `int`: ID of the guideline <br />                                 |
| `margin`      | `int`: the margin to the right or bottom side of container <br /> |

### setGuidelinePercent

```
public void setGuidelinePercent (int guidelineID, 
                float ratio)
```

Set a Guideline's percent.

<br />

|                                                  Parameters                                                  ||
|---------------|-----------------------------------------------------------------------------------------------|
| `guidelineID` | `int`: ID of the guideline <br />                                                             |
| `ratio`       | `float`: the ratio between the gap on the left and right 0.0 is top/left 0.5 is middle <br /> |

### setHorizontalBias

```
public void setHorizontalBias (int viewId, 
                float bias)
```

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

<br />

|                         Parameters                          ||
|----------|---------------------------------------------------|
| `viewId` | `int`: ID of view to adjust the horizontal <br /> |
| `bias`   | `float`: the new bias 0.5 is in the middle <br /> |

### setHorizontalChainStyle

```
public void setHorizontalChainStyle (int viewId, 
                int chainStyle)
```

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

- -- the elements will be spread out
- -- similar, but the endpoints of the chain will not be spread out
- -- 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

<br />

<br />

|                                        Parameters                                         ||
|--------------|-----------------------------------------------------------------------------|
| `viewId`     | `int`: ID of view to adjust its HorizontalChainStyle <br />                 |
| `chainStyle` | `int`: the weight that we can use to distribute the horizontal space <br /> |

**See also:**

- [ERROR(/CHAIN_SPREAD)](https://developer.android.com/)
- [ERROR(/CHAIN_SPREAD_INSIDE)](https://developer.android.com/)
- [ERROR(/CHAIN_PACKED)](https://developer.android.com/)  

### setHorizontalWeight

```
public void setHorizontalWeight (int viewId, 
                float weight)
```

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

<br />

|                                       Parameters                                        ||
|----------|-------------------------------------------------------------------------------|
| `viewId` | `int`: ID of view to adjust its HorizontalWeight <br />                       |
| `weight` | `float`: the weight that we can use to distribute the horizontal space <br /> |

### setIntValue

```
public void setIntValue (int viewId, 
                String attributeName, 
                int value)
```

<br />

<br />

|            Parameters            ||
|-----------------|-----------------|
| `viewId`        | `int` <br />    |
| `attributeName` | `String` <br /> |
| `value`         | `int` <br />    |

### setMargin

```
public void setMargin (int viewId, 
                int anchor, 
                int value)
```

Sets the margin.

<br />

|                         Parameters                         ||
|----------|--------------------------------------------------|
| `viewId` | `int`: ID of view to adjust the margin on <br /> |
| `anchor` | `int`: The side to adjust the margin on <br />   |
| `value`  | `int`: The new value for the margin <br />       |

### setRotation

```
public void setRotation (int viewId, 
                float rotation)
```

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

<br />

|                          Parameters                          ||
|------------|--------------------------------------------------|
| `viewId`   | `int`: ID of view to adjust th Z rotation <br /> |
| `rotation` | `float`: the rotation about the X axis <br />    |

### setRotationX

```
public void setRotationX (int viewId, 
                float rotationX)
```

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

<br />

|                          Parameters                           ||
|-------------|--------------------------------------------------|
| `viewId`    | `int`: ID of view to adjust th X rotation <br /> |
| `rotationX` | `float`: the rotation about the X axis <br />    |

### setRotationY

```
public void setRotationY (int viewId, 
                float rotationY)
```

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

<br />

|                           Parameters                           ||
|-------------|---------------------------------------------------|
| `viewId`    | `int`: ID of view to adjust the Y rotation <br /> |
| `rotationY` | `float`: the rotationY <br />                     |

### setScaleX

```
public void setScaleX (int viewId, 
                float scaleX)
```

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

<br />

|                         Parameters                          ||
|----------|---------------------------------------------------|
| `viewId` | `int`: ID of view to adjust the scale in X <br /> |
| `scaleX` | `float`: the scale in X <br />                    |

### setScaleY

```
public void setScaleY (int viewId, 
                float scaleY)
```

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

<br />

|                         Parameters                          ||
|----------|---------------------------------------------------|
| `viewId` | `int`: ID of view to adjust the scale in Y <br /> |
| `scaleY` | `float`: the scale in Y <br />                    |

### setStringValue

```
public void setStringValue (int viewId, 
                String attributeName, 
                String value)
```

<br />

<br />

|            Parameters            ||
|-----------------|-----------------|
| `viewId`        | `int` <br />    |
| `attributeName` | `String` <br /> |
| `value`         | `String` <br /> |

### setTransformPivot

```
public void setTransformPivot (int viewId, 
                float transformPivotX, 
                float transformPivotY)
```

Set X,Y location of the pivot point around which the view will rotate and scale. use Float.NaN to clear the pivot value. Note: once an actual View has had its pivot set it cannot be cleared.

<br />

|                                    Parameters                                    ||
|-------------------|---------------------------------------------------------------|
| `viewId`          | `int`: ID of view to adjust the transforms pivot point <br /> |
| `transformPivotX` | `float`: X location of the pivot point. <br />                |
| `transformPivotY` | `float`: Y location of the pivot point. <br />                |

### setTransformPivotX

```
public void setTransformPivotX (int viewId, 
                float transformPivotX)
```

Set X location of the pivot point around which the view will rotate and scale. use Float.NaN to clear the pivot value. Note: once an actual View has had its pivot set it cannot be cleared.

<br />

|                                        Parameters                                        ||
|-------------------|-----------------------------------------------------------------------|
| `viewId`          | `int`: ID of view to adjust the transforms pivot point about X <br /> |
| `transformPivotX` | `float`: X location of the pivot point. <br />                        |

### setTransformPivotY

```
public void setTransformPivotY (int viewId, 
                float transformPivotY)
```

Set Y location of the pivot point around which the view will rotate and scale. use Float.NaN to clear the pivot value. Note: once an actual View has had its pivot set it cannot be cleared.

<br />

|                                        Parameters                                        ||
|-------------------|-----------------------------------------------------------------------|
| `viewId`          | `int`: ID of view to adjust the transforms pivot point about Y <br /> |
| `transformPivotY` | `float`: Y location of the pivot point. <br />                        |

### setTranslation

```
public void setTranslation (int viewId, 
                float translationX, 
                float translationY)
```

Adjust the post-layout translation of a view.

<br />

|                                  Parameters                                  ||
|----------------|--------------------------------------------------------------|
| `viewId`       | `int`: ID of view to adjust its translation in X \& Y <br /> |
| `translationX` | `float`: the translation in X <br />                         |
| `translationY` | `float`: the translation in Y <br />                         |

### setTranslationX

```
public void setTranslationX (int viewId, 
                float translationX)
```

Adjust the post-layout X translation of a view.

<br />

|                         Parameters                         ||
|----------------|--------------------------------------------|
| `viewId`       | `int`: ID of view to translate in X <br /> |
| `translationX` | `float`: the translation in X <br />       |

### setTranslationY

```
public void setTranslationY (int viewId, 
                float translationY)
```

Adjust the post-layout Y translation of a view.

<br />

|                          Parameters                           ||
|----------------|-----------------------------------------------|
| `viewId`       | `int`: ID of view to to translate in Y <br /> |
| `translationY` | `float`: the translation in Y <br />          |

### setTranslationZ

```
public void setTranslationZ (int viewId, 
                float translationZ)
```

Adjust the translation in Z of a view.

<br />

|                     Parameters                     ||
|----------------|------------------------------------|
| `viewId`       | `int`: ID of view to adjust <br /> |
| `translationZ` | `float`: the translationZ <br />   |

### setVerticalBias

```
public void setVerticalBias (int viewId, 
                float bias)
```

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

<br />

|                         Parameters                          ||
|----------|---------------------------------------------------|
| `viewId` | `int`: ID of view to adjust the vertical <br />   |
| `bias`   | `float`: the new bias 0.5 is in the middle <br /> |

### setVerticalChainStyle

```
public void setVerticalChainStyle (int viewId, 
                int chainStyle)
```

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

- -- the elements will be spread out
- -- similar, but the endpoints of the chain will not be spread out
- -- 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

<br />

<br />

|                                        Parameters                                         ||
|--------------|-----------------------------------------------------------------------------|
| `viewId`     | `int`: ID of view to adjust its VerticalChainStyle <br />                   |
| `chainStyle` | `int`: the weight that we can use to distribute the horizontal space <br /> |

**See also:**

- [ERROR(/CHAIN_SPREAD)](https://developer.android.com/)
- [ERROR(/CHAIN_SPREAD_INSIDE)](https://developer.android.com/)
- [ERROR(/CHAIN_PACKED)](https://developer.android.com/)  

### setVerticalWeight

```
public void setVerticalWeight (int viewId, 
                float weight)
```

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

<br />

|                                      Parameters                                       ||
|----------|-----------------------------------------------------------------------------|
| `viewId` | `int`: ID of view to adjust its VerticalWeight <br />                       |
| `weight` | `float`: the weight that we can use to distribute the vertical space <br /> |

### setVisibility

```
public void setVisibility (int viewId, 
                int visibility)
```

Adjust the visibility of a view.

<br />

|                          Parameters                           ||
|--------------|-------------------------------------------------|
| `viewId`     | `int`: ID of view to adjust the vertical <br /> |
| `visibility` | `int`: the visibility <br />                    |