Stay organized with collections
Save and categorize content based on your preferences.
Lesson 6: App navigation
Create a fragment, define navigation paths, and start an external activity. Complete the AndroidTrivia app, which is a game in which users answer trivia questions about Android development and can share their results if they win.
Go back
check_circle
Create a fragment
emoji_objects
Codelab
Import the starter code for the AndroidTrivia app. Then, create a new fragment and include it in the layout file.
Add navigation components to the AndroidTrivia app by creating a NavHostFragment, then add fragments to the navigation graph. Change the back button behavior, add up button functionality in the app, add an options menu, and add a navigation drawer.
Update the AndroidTrivia app to allow users to share results with friends through other apps. Set up the Safe Args plugin, add and pass arguments between fragment destinations, and use an implicit intent for the share menu item.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],[],[],[],null,[]]