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
From the course: Android Studio Essential Training 2020
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
-
-
-
-
-
-
-
-
(Locked)
Create new Kotlin and Java code files3m
-
(Locked)
Edit code files in the editor window3m 15s
-
(Locked)
Useful code editing shortcuts4m 49s
-
(Locked)
Refactor and inspect code3m 6s
-
(Locked)
Create and use live templates3m 32s
-
Edit layouts with design and text mode3m 36s
-
(Locked)
Add MotionLayout to an XML layout file2m 2s
-
(Locked)
Animate views in the Motion Editor4m 56s
-
(Locked)
Challenge: Extract code to a new class1m 8s
-
(Locked)
Solution: Extract code to a new class2m 12s
-
(Locked)
-
-
-
-