Tuesday, June 26, 2018

ConstraintLayout 2.0.0 alpha 1

We are very happy to announce the first alpha release of ConstraintLayout 2.0. It’s available from the google maven repository:

dependencies {
  implementation 'com.android.support.constraint:constraint-layout:2.0.0-alpha1'
}

This is the first release containing the new MotionLayout class. MotionLayout is a layout designed to provide a rich framework for declarative animation and input-driven motion.

Also included in this release:

  • ConstraintProperties - an API for manipulating ConstraintLayout properties
  • A new state management API for ConstraintLayout (see setState())

Documentation is available on
https://developer.android.com/reference/android/support/constraint/classes

A sample application for MotionLayout is also available on
https://github.com/googlesamples/android-ConstraintLayoutExamples