Thursday, March 11, 2021

ConstraintLayout 2.1.0 beta 1

 We are happy to announce the release of ConstraintLayout 2.1.0 beta 1, with many new features :)


dependencies {

    implementation 'androidx.constraintlayout:constraintlayout:2.1.0-beta01'

}


What's new in 2.1.0

More information about the new features in 2.1.0 can be found on the wiki, the source code is available on https://github.com/androidx/constraintlayout


What's new in 2.1.0 beta 1


ConstraintLayout

  • android:layout_width and android:layout_height are back being non-optional due to compatibility issues.

Helpers

  • added a way to animate or jump directly to a given item of a Carousel
  • new CircularFlow helper

MotionLayout

  • Programmatic support for inserting and removing onSwipe and onClick on Transitions
  • Experimental Support for Transitions through screen rotation
  • support duration argument to transitions
  • Better support for customAttributes that are boolean or References

Fixes


[MotionLayout] transitionToState has significant delays between Transitions with beta7 and beyond164846248
ConstraintLayout 2.0.2 broke layout_constraintDimensionRatio170313444
ConstraintLayout 2.0.3/2.0.4 broke layout_constraintDimensionRatio constrain one specific side172048754
MotionLayout customBoolean is not working correctly156780146
constraintSet.applyTo(...) when called two or more times in a row, sometimes doesn't work in beta8.160714159
ConstraintLayout 2.0.1 miscalculated the Height of its container169182428
MotionLayout is not able to load scenes programatically173848665
Barrier work incorrectly on layout preview and RecyclerView174070152
[Regression 2.0.1 -> 2.0.4] Center a view to another view doesn't work properly (Possible rounding issue)174248029
API Breaking: ConstraintLayout.LayoutParams now inherits directly from ViewGroup.LayoutParams176221189
MotionLayout: UnsupportedOperationException: Can't convert to dimension: type=0x3 (API 16)179692880
KeyTrigger action not called135938944
[2.0.0-rc1] onTransitionCompleted not called after an extremely fast OnSwipe transition163608550
TransitionListener is not called for transition170870064
ConstraintLayout 2.0.1-2.0.4 does not respect direction (rtl) in Flow's app:flow_horizontalBias172349347
constraintset setVisibility does not work for group172652620
Make it possible to programatically switch between items in Carousel Helper173785377
[Regression 2.0.1 -> 2.0.4] ConstraintLayout with wrap_content width doesn't show all visible views174231601
[regression 2.0.2 -> 2.0.3] ConstatintLayout Flow views overlapps each other with "chain" wrapMode174313770
2.0.0-beta6 and higher - autoTransition="animateToStart" not work175475328
ConstraintLayout 2.1.0-alpha2 causes the MaterialTimePicker layout to break175936038
Updating left/right margins programmatically does not work in ConstraintLayout 2.1.0-alpha2176819521
Constraining to an <include>ed Guideline Throws an AssertionError177338137
ConstraintLayout Flow overlapping views with wrap_content width177928784
BUG181589156