Skip to content

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.

New in Compose 1.1.0-alpha04

ConstraintLayout

  • Allow referencing helpers when creating barriers

MotionLayout

MotionCarousel

Flow Helper

Known Issues

  • Content may not remeasure properly if it doesn’t recompose together with the ConstraintLayout/MotionLayout parent.

New in Compose 1.1.0-alpha02

MotionLayout

  • Refactor out MotionLayout.kt classes 616

New in Compose 1.1.0-alpha01

MotionLayout

  • 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 by onSwipe
  • 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

Known Issues

  • 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