Before we begin

TLDR? View the source code on Github. It’s well documented and contains code for both; with and without MotionLayout.

It’s well documented and contains code for both; with and without MotionLayout. Download the app on the PlayStore or build the source code to demo the app. (Don’t forget to check the “Use MotionLayout” checkbox in the Nav Drawer).

What is MotionLayout? A quick intro…

Simply put, MotionLayout is a ConstraintLayout that allows you to easily transition between two ConstraintSets.

<ConstraintSet> contains all the constraints and layout attributes for each view.

<Transition> specifies the starting and ending ConstraintSets to transition between.

Throw all of this into a <MotionScene> file and you have yourself a MotionLayout!

As layouts and animations become more complex, the MotionScene also becomes more elaborate. We’re going to take a look at these components.

Learn more about MotionLayout:

#1 Nicolas Roard’s Introduction to MotionLayout Series.

#2 James Pearson’s Advanced & Practical MotionLayout Talk.

#3 Official Android Developers Guide on MotionLayout.