From the course: Android Studio Essential Training
Unlock the full course today
Join today to access over 24,800 courses taught by industry experts.
Animate objects with MotionLayout
From the course: Android Studio Essential Training
Animate objects with MotionLayout
- [Instructor] Android Studio has a tool called the Motion Editor that makes it easy to set up simple animations. To demonstrate this, I'll create a new project and I'll base it on the empty activity template. And I'll name the new project Motion Editor. In this project, I want to animate a graphic, and so my first step is to create a graphic that I can use. In my project window, I'll right-click on the app module and choose new, vector asset. I'll click the clip art button and I'll type basketball. And there's a sports basketball icon. I'll choose that and click through to create the graphic. And that creates the file in the resource directory under Drawable. Now, I want to display the graphic in my activity. My project was created with an initial layout called activity_main, and I'm going to use the Command or Control key and then click on that to jump to the file. I'll use the palette and I'm going to drag and drop an…