📚 ConstraintLayout 2.0.0
💡 Newskategorie: Programmierung
🔗 Quelle: androidstudio.googleblog.com
We are very happy to announce the stable release of ConstraintLayout 2.0 -- a long journey, but this version adds a very long list of capabilities to v1!
In addition to the existing Layout Editor in Android Studio, allowing easy creation and edition of UI with ConstraintLayout, we recently added a new Motion Editor in Android Studio 4.0+, enabling you to quickly take advantage of MotionLayout in your projects.
implementation 'androidx.constraintlayout:constraintlayout:2.0.0'
}
or if using the android.support packages:
dependencies {
implementation 'com.android.support.constraint:constraint-layout:2.0.0'
}
Examples are available on https://github.com/android/views-widgets-samples/tree/master/ConstraintLayoutExamples
Note
Bugfixes
- MotionLayout Transition delays & TransitionListener fixes
- ConstraintLayout flow & barrier fixes
MotionLayout inside ScrollView does not properly adjust height after transition | 140447122 |
A view has 0 width instead of full width when surrounded and constrained with other three gone views | 162917672 |
ConstraintLayout : View that has both top and bottom constraints is positioned wrong | 163880200 |
ConstraintLayout : incorrect positioning when applying a bias of 1.0 | 165028374 |
Setting the visibility of a View to GONE causes layout to render incorrectly in 2.0.0-rc1 | 164130218 |
[Flow] android:layout_width == 0dp works wrong | 164794521 |
TransitionListener.onTransitionChange is called over and over again when use MotionLayout in RelativeLayout | 152542382 |
Incorrect positioning of Barriers in 2.0.0-beta5 | 159540431 |
TOP barrier broken in beta8 | 163100583 |
Long duration fadeIn animation | 163848906 |
Negative padding causes issues with 2.0.0-rc1 | 164160877 |