From the course: Android Development Essential Training: App Architecture with Kotlin

Unlock the full course today

Join today to access over 22,500 courses taught by industry experts or purchase this course individually.

Add a navigation drawer to a layout

Add a navigation drawer to a layout - Android Tutorial

From the course: Android Development Essential Training: App Architecture with Kotlin

Start my 1-month free trial

Add a navigation drawer to a layout

- [Instructor] A navigation drawer is a visual component that slides in from the side of the screen presenting a menu of navigation options. It typically provide navigation tools for the entire app in this interface and reserve the options menu for tools that only apply to the current activity. I previously showed how to add navigation from the options menu but now I'm going to move them into a navigation drawer. I'll start by creating a new menu file and I'll create it by copying the options menu file. I'll press controller command C to copy and then controller command V to paste and I'll set the name of the new file to nav_main.xml. In a nav drawer, you don't have the option to show as action so I'll delete that and then I'll select and duplicate this item and I'll set the first one with a title of settings and an ID of action_settings. I'll follow the good practice of making sure I've taken any literal strings and put them into string resources. I'll place the cursor in settings…

Contents