


This custom view paints a blue circle with a radius dependent on the radius variable. All transitions and animations might be described purely in xml.īefore we start playing with MotionLayout, we need to add suitable dependencies to a project. The amazing thing about MotionLayout is that it’s fully declarative.

The difference is that MotionLayout builds upon its capabilities - we can now describe layout transitions and animate view properties changes. We can define and constraint children just like we would do when using standard ConstraintLayout. So, what’s the MotionLayout? Simply put, MotionLayout is a Viewgroup that extends ConstraintLayout.
