0.6.0
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
- Update to Compose 1.0.0 (#53) @fornewid
- Migrate to experimental MaterialMotion (#52) @fornewid
- Deprecate non-Material Motion APIs (alpha, rotate, scale, translate) (#50) @fornewid
- Remove deprecated crossfade (#51) @fornewid
- Create new experimental MaterialMotion based on AnimatedContent (#49) @fornewid
- Apply API Guidelines for Jetpack Compose (#48) @fornewid
- Use android gradle 7.0.0-rc01 (#47) @fornewid