Complete the code to open the navigation drawer when the menu icon is clicked.
drawerLayout.[1](GravityCompat.START)The openDrawer method opens the navigation drawer from the specified gravity side.
Complete the code to set the navigation item selected listener for the drawer.
navigationView.[1] = thisThe setNavigationItemSelectedListener method sets the listener to handle menu item clicks in the navigation drawer.
Fix the error in the code to properly close the drawer when an item is selected.
drawerLayout.[1](GravityCompat.START)To close the drawer, use the closeDrawer method with the gravity side.
Fill both blanks to check if the drawer is open and then close it.
if (drawerLayout.[1](GravityCompat.START)) { drawerLayout.[2](GravityCompat.START) }
First, check if the drawer is open using isDrawerOpen. If true, close it with closeDrawer.
Fill all three blanks to create a map of menu item IDs to their titles from the navigation menu.
val menuMap = navigationView.menu.[1] { item -> item.[2] to item.[3] }
The associate function creates a map. Use itemId for keys and title for values.