Movies. is the sample preview app of the MotionLayout experiments.
This app realizes the InVision Studio — Movies app concept.
| Design | Code |
|---|---|
![]() |
![]() |
- Added the relative transition change of the Movie carousel progress, and the Movie details bottom info progress.
- Added the relative transition change of the Movie carousel progress, and the Movie rating progress.
- Tuned some Movie carousel transitions values.
- Fixed the movie description transition.
| Design | Code |
|---|---|
![]() |
![]() |
- Advanced animation examples by only using the
ConstraintLayoutandMotionLayoutAPIs. - The nested
MotionLayouts are decorated asCustomViews. It is possible to have multipleMotionLayouts on the same screen and manipulate them in your own manner. - The multiple
Carousels relations and progress transitions examples. - The examples of switching and propagating the progress between the transitions programmatically.
- Great staggered animation example and its REAL usage.
- Animates the default scenarios easily and with the advanced preview/editor.
- Possibility to decouple
MotionLayouts into the nested ones (f.e.CustomView). - The
ImageFilterViewis kinda of a cherry on top, across theMotionLayouthelpers. - Possibility to run different and nested
MotionLayouts transitions simultaneously. - Decouples the animation stuff from the code to the motion scene file.
- Ability to transition the custom views and their attributes.
- Staggered animations and their manipulation.
- The advanced animation cases currently hard to achieve, especially with the multitouch.
- The
Carouseldoes not provide a quick solution, it is better to useViewPagerorRecyclerView. - The
MotionLabelis BUGGY/artifacty inside the transition and does not support the custom fonts. - The multitouch support requires a lot of improvements. It is not possible to properly have vertical/horizontal swipe and clicks simultaneously.
- And again,
Carouselwith the swipe and click, is the functionality we lack. - The
NestedScrollView/nested scroll inside the transition is not working. It is better to useAppBar/CollapsingToolbar. - Sometimes
MotionLayoutdraws some artifacts on quick transitions switch. - Editor does not invalidate the cache, and it forces reloading Android Studio frequently.
- The
ConstraintSet/Constraintoverrides sometimes does not work properly, so it forces to rewrite the wholeConstraintfrom the original state. Lack of functionality to properly set/switch between the transitions. Right now it works the best when you have one scene with one transition.- It is not possible to extend the MotionLayout as the
CustomView, because there is not such a method to set the scene programmatically. It forces to wrap the MotionLayout into theFrameLayoutor other. - It still in beta, so it requires the last beta/alpha Android Studio build.
Lack of the possibility to chain/reference multiple/nestedMotionLayouts. For example, if you want to animate the main transition and with it propagate the animation state to the others.
The MotionLayout is an amazing solution for simple and advanced screen animations. It works well for the single
transition to the end and back, but when there are multiple transitions the problems could occur. It has the handy
scene editor under the hood, so it is useful to test transitions inside the Android Studio. The other advantage of the
MotionLayouts is the ability to decouple them into the CustomViews. Also, MotionLayout supports touch events, like
click and swipe, but I would not recommend them right now, because it still buggy, especially inside the Carousel. The
following helpers Carousel and MotionLabel are not worth it for now, because the API is not completed yet and
they contain some real issues. On the other hand, the ImageFilterView and MotionEffect do the job properly.
In my opinion, MotionLayout should be used for some stunning screen animations, where no touch events included, for
example splash screen, tutorial screen, or dashboard screen.
This sample app uses the following ConstrainLayout version:
dependencies {
implementation("androidx.constraintlayout:constraintlayout:2.1.0-beta02")
}Also, this sample app requires a Android Studio Beta - Arctic Fox.
Special thanks to the Charles Patterson.



