From the course: Android Studio Essential Training 2020

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Add MotionLayout to an XML layout file

Add MotionLayout to an XML layout file

From the course: Android Studio Essential Training 2020

Start my 1-month free trial

Add MotionLayout to an XML layout file

- [Instructor] Android Studio 4 has a new motion editor tool that lets you prototype simple animations. To demonstrate this, I'm going to create a brand new project that I'll base on the empty activity template and I'll name it MotionDemo. The motion editor tool is designed to work with a component called MotionLayout, which is part of the ConstraintLayout API. And in order to use it in Android Studio 4, you must have upgraded to ConstraintLayout 2.0 or later. I'll go to my build.gradle file for the app module and scroll down to the dependencies, and if necessary, I'll do the upgrade. I'll click into the ConstraintLayout dependency and use an intention action and change to whatever is the most recent version. I'll resync Gradle and I'll also hide any other notifications that might've popped up. Next, I'll go to activity_main and see that my root element is a ConstraintLayout. I'll right click on it and now because…

Contents