+ // Create the navigation drawer.
+ drawerLayout = (DrawerLayout) findViewById(R.id.drawerLayout);
+ // The DrawerTitle identifies the drawer in accessibility mode.
+ drawerLayout.setDrawerTitle(GravityCompat.START, getString(R.string.navigation_drawer));
+
+ // Listen for touches on the navigation menu.
+ final NavigationView navigationView = (NavigationView) findViewById(R.id.navigationView);
+ navigationView.setNavigationItemSelectedListener(this);
+
+ // drawerToggle creates the hamburger icon at the start of the AppBar.
+ drawerToggle = new ActionBarDrawerToggle(this, drawerLayout, supportAppBar, R.string.open_navigation, R.string.close_navigation);
+