What is the difference between coordinator layout and motionlayout?

Viewed 510

Everywhere the examples of coordinator layout and motion layout make them both seem to do the exact same task. People (and even documentations) seem to show same purpose of both layouts. But can anyone state in detail with real life examples, the exact difference between both layouts? Thanks in advance!

1 Answers

Motion Layout:

MotionLayout is a layout type that helps you manage motion and widget animation in your app. MotionLayout is a subclass of ConstraintLayout and builds upon its rich layout capabilities.

Coordinator layout:

CoordinatorLayout is a super-powered FrameLayout. By specifying Behaviors for child views of a CoordinatorLayout you can provide many different interactions within a single parent and those views can also interact with one another.

Behaviors may be used to implement a variety of interactions and additional layout modifications ranging from sliding drawers and panels to swipe-dismissable elements and buttons that stick to other elements as they move and animate.

For more details you can check documentation:

Motion Layout

Coordinator Layout

Related