Tuesday, October 6, 2020

ConstraintLayout 2.0.2

 ConstraintLayout 2.0.2 is now available on the google maven repository: 


dependencies {
  implementation 'androidx.constraintlayout:constraintlayout:2.0.2'
}


or if using the android.support packages:


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

Documentation & Examples




Bugfixes

This releases improves performances as well as fix a few issues. It is recommended to update to this version.
  • Handling of view GONE visibility in ConstraintLayout was incorrect in some situations
  • Handling of packed chains in ConstraintLayout was incorrect in some situations
  • Fixed inflation exception on API 15 for the Flow virtual layout helper
  • limitsBoundsTo was broken in MotionLayout
  • jump to end was broken in MotionLayout in some situations (chaining transitions)
Flow inflation exception on API 15165312258
java.lang.ClassCastException: androidx.constraintlayout.solver.ArrayLinkedVariables cannot be cast to androidx.constraintlayout.solver.SolverVariableValues165964943
The attribute "flow_horizontalAlign" was defined with the wrong format168495397
Margins are not visible (gone)162917675
VerticalBias not working when another view has a constraint to the top of the original view167014942
Barrier makes constraint work incorrectly167612342
When horizontal chain style is set to packed it is not working as expected167701934
MotionLayout: Quick swipes outside of limitBoundsTo are not ignored168373996
Setting the visibility of a View to GONE causes layout to render incorrectly in 2.0.1168681861
ConstraintLayout 2.0.0/2.0.1 "gone" views is not taken into consideration the same way as in 2.0.0-rc1166486001