Skip to content

0.6.0

Compare
Choose a tag to compare
@github-actions github-actions released this 29 Jul 04:54
· 260 commits to main since this release

Built to work with Jetpack Compose 1.0.0

Breaking changes

⚠️ MaterialMotion has been completely rewritten based on AnimatedContent.

So all classes in the soup.compose.material.motion.experimental package have been removed.

Please check the before and after in the following codes:

  • Shared axis

    - motionSpec = materialSharedAxis(Axis.X, forward = true, slideDistance = 30.dp)
    + motionSpec = materialSharedAxisXIn(forward = true, slideDistance = rememberSlideDistance(30.dp)) with
    +              materialSharedAxisXOut(forward = true, slideDistance = rememberSlideDistance(30.dp))
    
    - motionSpec = materialSharedAxis(Axis.Y, forward = true, slideDistance = 30.dp)
    + motionSpec = materialSharedAxisYIn(forward = true, slideDistance = rememberSlideDistance(30.dp)) with
    +              materialSharedAxisYOut(forward = true, slideDistance = rememberSlideDistance(30.dp))
    
    - motionSpec = materialSharedAxis(Axis.Z, forward = true)
    + motionSpec = materialSharedAxisZIn(forward = true) with
    +              materialSharedAxisZOut(forward = true)
  • Fade through

    - motionSpec = materialFadeThrough()
    + motionSpec = materialFadeThroughIn() with materialFadeThroughOut()
  • Fade (MotionSpec is not supported)

     // Before
     MaterialFade(
         targetState = visible
     ) { visible ->
         if (visible) {
             // contents
         }
     }
    
     // After
     MaterialFade(
         visible = visible
     ) {
         // contents
     }
  • Elevation scale

    - motionSpec = materialElevationScale()
    + motionSpec = materialElevationScaleIn() with materialElevationScaleOut()
  • Hold

    - motionSpec = hold()
    + motionSpec = holdIn() with holdOut()

⚠️ Deprecate ProvideMaterialMotions & Durations.

Instead, just pass a duration directly when creating material motion.

For example:

val motionSpec = materialFadeThroughIn(durationMillis = 300) with materialFadeThroughOut(durationMillis = 300)

⚠️ Deprecate non-Material Motion APIs. (alpha(), rotate(), scale(), translate())

All changes