To navigate between Android app screens, you start new activities. In this video, learn how to navigate from a launcher activity to a secondary activity.
- [Instructor] My application now has two activities, … the Main and the Dice activity, … but I'm only able to see the Launcher activity. … To fix this, I'll add a new button to the Main activity … that the user touches or clicks … to jump to the Dice activity and roll the dice. … I'll go to the activity main file … and right now, it doesn't have any UI elements, … I'll drag in a button and then I'll constrain the button … to the top, bottom, left and right edges. … If you don't see the constraint anchors, … just click off the button and click on again … and they should appear. … Now I'll change the unique ID of the button … to rollButton and then I'll change a few UI elements, … I'll go down to the bottom and find its text value. … Notice there are two values here, … the second one with the wrench … is only for Android Studio in Design view, … you'll want to change the first one. … Click this little button to the right … and that'll show you a Resources window … with all of your string resources …
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