Android apps have multiple activities, but only one is the launcher. In this video, learn how to add a new launcher activity to an app.
- [Instructor] Most Android apps have multiple activities. … Only one activity in each app … is known as the launcher activity. … All other activities are launched from there … and in some cases can be launched … in response to requests from other apps. … In order to demonstrate this, … I'm going to add a new activity to this project. … It's going to become in the launcher activity … and my current activity, … currently called Main Activity, … will become a secondary activity. … So I'm going to refactor this. … I'm going to rename MainActivity as DiceActivity. … I'll click on the activity class in the Project Window, … then I'll press shift + F6 … and that opens the rename dialog, … I'll change this to DiceActivity … and click Refactor … and that changes the name of the activity, … both in the file name, … in the code and anywhere … where that activity is referenced. … For consistency in file naming … I'll go to my layout directory under resources … and once again I'll use refactoring …
Looking for study partners?Join the Associate Android Developer Exam study group
The Android app architecture constantly evolves. The introduction of the Kotlin programming language, new form factors such as Chromebooks, and reusable architecture components have made it faster and easier than ever to build high-quality Android apps. It is imperative that developers understand what the latest tools and recommendations are and how to use them to build out their applications. In this course, instructor David Gassner explains how to build an Android app that uses Kotlin instead of Java, add navigation functionality, and leverage the most useful architecture components such as LifecycleObserver, ViewModel, and LiveData, to create apps that are robust and easy to maintain over time.
- Handling lifecycle events
- Handling view events
- Updating display from new data
- Adding ViewModels to activities
- Subscribing to changes in LiveData values
- Adding a new launcher activity
- Starting activities with explicit intents
- Sharing data with implicit intents
- Adding a navigation drawer
- Adding a header to a navigation drawer
- Handling navigating drawer menu events