Introducing the Motion Editor
Posted by Scott Swarthout, Product Manager
We spoke with the Android developer community and learned that animations are important for making UIs more intuitive and memorable. However, we also heard that adding complex animation to Android apps has been a difficult task.To address this problem, we created a powerful set of APIs with Motion Layout and a corresponding tool – Motion Editor, that when combined make it easier to build pixel-perfect animations. This blog is a quick tour of the new Motion Editor and how to use the latest features during your animation development. Additionally today, you can now watch a new video series specifically created to teach you about the various APIs included with MotionLayout. Watch here .
Motion Editor is a visual design editor for the MotionLayout layout type, making it easier to create and preview animations. We just released the stable version Motion Editor in Android Studio 4.0 and we already see many developers using it to build animations.
Animation running in the Motion Editor
The Motion Editor is an extension of Android Studio’s layout editor, and automatically opens when you select the Design or Split view on an XML file containing a MotionLayout. From there, you can edit your layout and Motion Scene files using the familiar interactive tools of the Layout Editor as well as preview your animations right from the Android Studio preview pane.
The Motion Editor is broken up into several panels which we will describe in this article. The main panels are: Overview, Selection, Attribute, and Preview .
The Motion Editor has four main panels
MotionLayout helps you animate layout changes, which you specify as transitions between ConstraintSets . The Motion Editor helps you visualize these states with the Overview panel. To edit constraints in a ConstraintSet, click on the corresponding box in the Overview panel.
MotionLayout Scene with two ConstraintSets, start and end, and a Transition between them
The Selection panel provides detailed controls based on the state of the Overview panel. It has three modes:
Motion Layout selected
The selection panel has three modes depending on the state of the Overview panel
The Motion Editor supports editing of the base Motion Layout . When Motion Layout is selected in the Overview panel, you can select components to see if they are properly constrained.
Check if components are properly constrained with the Selection panel
When a ConstraintSet is selected, the Selection panel displays the list of components and a checkmark to indicate if the component is constrained in this ConstraintSet.
Select components to be included in the...