Google is committed to advancing racial equity for Black communities. See how.


Position and size widgets in a flexible way with relative positioning.
Latest Update Current Stable Release Next Release Candidate Beta Release Alpha Release
June 12, 2020 1.1.3 - 2.0.0-beta7 -

To add a dependency on ConstraintLayout, you must add the Google Maven repository to your project. Read Google's Maven repository for more information.

Add the dependencies for the artifacts you need in the build.gradle file for your app or module:

dependencies {
    implementation "androidx.constraintlayout:constraintlayout:2.0.0-beta7"

For more information about dependencies, see Add build dependencies.


Your feedback helps make Jetpack better. Please let us know if you discover new issues or have ideas for improving this library. Please take a look at the existing issues in this library before you create a new one. You can add your vote to an existing issue by clicking the star button.

Create a new issue

See the Issue Tracker documentation for more information.

Version 2.0.0

ConstraintLayout 2.0 adds new features for layouts (virtual layouts, etc.) and a new class for simplifying animation of views, MotionLayout.

Version 2.0.0-beta7

June 12, 2020

androidx.constraintlayout:constraintlayout:2.0.0-beta7 is released.

Bug Fixes

See the list of closed issues here.

Notable fixes are:

  • Nested scroll view issues in MotionLayout
  • Transition listener issues with MotionLayout
  • Memory leak in MotionLayout
  • RecyclerView issues
  • Group visibility
  • Padding issues

Version 2.0.0-beta6

May 13, 2020

androidx.constraintlayout:constraintlayout:2.0.0-beta6 is released.

Bug Fixes

See the list of closed issues here. Notable fixes are group visibility handling and derived constraints issues in MotionLayout.

Version 2.0.0-beta5

May 7, 2020

androidx.constraintlayout:constraintlayout:2.0.0-beta5 is released.

Bug Fixes

See the list of closed issues here

Version 2.0.0-beta4

December 16, 2019

androidx.constraintlayout:constraintlayout:2.0.0-beta4 is released.

New Features


New attributes in Transition:

  • layoutDuringTransition : let you configure how MotionLayout should react to children's requestLayouts calls during a transition. Possible values are {ignoreRequest, honorRequest}
  • pathMotionArc : the path taken by elements moving will use an arc. Possible values are {startVertical | startHorizontal | flip | none }

A default transition is now possible to define, simply by omitting the start and end ConstraintSets. That default transition will be used if no other existing transition can be found to match the current start/end states.

Bug Fixes

See the list of closed issues here