-
Notifications
You must be signed in to change notification settings - Fork 174
What's New in 1.1 (Compose)
Shane Wong edited this page Dec 5, 2022
·
10 revisions
ConstraintLayout-compose 1.1 focuses on bringing more MotionLayout features in Compose.
Constraints can be created either via a Kotlin DSL (in modifiers or as a separate ConstraintSet), or via a JSON ConstraintSet.
Various examples can be found in this project.
- See the syntax for OnSwipe
- MotionLayout DSL Syntax
- Allow referencing helpers when creating barriers
- Added a DSL for MotionScene.
- Added a DSL for Transition.
- Support to force remeasure on every frame with MotionLayoutFlag.FullMeasure
- Carousel API for Compose using MotionLayout
- Added API for ConstraintSet DSL
- See createFlow
- Added API for ConstraintSet JSON
- See FlowDemo.kt
- Content may not remeasure properly if it doesn’t recompose together with the ConstraintLayout/MotionLayout parent.
- Refactor out MotionLayout.kt classes 616
- Limited support for
onSwipe
, drive the animation with swipes/dragging - Added
rememberMotionLayoutState
. When passed to a MotionLayout Composable, it may be used to animate the internal progress value and observe changes to it (within a Composable scope) made byonSwipe
- Support for stagger, easing and quantized movements
- Updated internals to better handle recomposition
- Fixed MotionLayout laying out different when using a debugging flag
- Minor performance improvements
- When using
onSwipe
all drag events are consumed (i.e:onSwipe
won’t work well with LazyList) - MotionLayout #526: Possible crashes when using compose 1.1.X