Explore MotionLayout examples in ComposeMail
mainThe ComposeMail sample project demonstrates practical implementations of MotionLayout within a Jetpack Compose mail client. Key implementation patterns include:
Foldable Support
Demonstrates how to adapt layouts for foldable devices using:
MotionSceneDslcombined withMotionLayoutto define motion states.MotionLayout()composable for rendering.resolveConstraintSet()to handle layout transitions.- Using
LocalFoldableInfo(viaCompositionLocal) andcollectFoldableInfoAsState()to provide foldable device state to the UI.
Paging Library Integration
Shows how to integrate MotionLayout with the Paging library, specifically handling data placeholders as loading indicators within a MailItem() composable.