Questions tagged [navigation-drawer]

Navigation Drawer in a mobile application is the side panel which slides out from the edge of the screen and displays the navigation menu of the application. Use this tag for programming questions related to navigation drawers only. General UX questions and other opinion based questions related to navigation drawers are not on topic for Stack Overflow.

Navigation Drawer in Android

The navigation drawer is commonly used as a "slide-in" navigation menu in Android applications. It slides in from the edge of the screen and displays a list of the application's main navigation options.

The drawer slides on top of the content instead of the content sliding away. With this, one can access any top level content from anywhere in the app and allows you to create a flatter navigation structure. It also has an action bar at the top. Lower versions also support it through support library.

Documentation

  • Design docs can be found here.
  • Developer docs can be found here.
  • DrawerLayout API reference can be found here.

Related tags:

5793 questions
13
votes
4 answers

Two Navigation Drawer on same Activity

Is it possible to configurate two Navigation Drawers on the same activity, one from the left and the other from the right?
Ruben Flores
  • 331
  • 1
  • 3
  • 13
13
votes
3 answers

Navigation drawer below Actionbar

Right now I just started a project in Android Studio with the NavigationBar as preconfigured in the template. Apparently it puts the navigation drawer behind the actionbar. Many questions you find want the navigation drawer on top of the actionbar,…
13
votes
3 answers

Navigation drawer (menudrawer) Android 5 (lollipop) style

I'm using menudrawer library in my project (this one: https://github.com/SimonVT/android-menudrawer). I'm updating my app to be compatible with API21 (Android 5 Lollipop) and Material Design. When you use this library with API21 menudrawer icon…
adek
  • 3,045
  • 2
  • 27
  • 41
13
votes
2 answers

Android: Navigation Drawer vertical shadow

I have implemented a NavigationDrawer in my application. I would like to know how I can add a vertical shadow effect which is below the main Fragment, similar to the picture below. I have one image on my drawable with the shadow image. It's called…
Aspicas
  • 4,498
  • 4
  • 30
  • 53
13
votes
3 answers

use of syncState() in ActionBarDrawerToggle

I'm using ActionBarDrawerToggle class to tie together the functionality of DrawerLayout and the framework ActionBar to implement the recommended design for navigation drawers. What Android developer site says is: Call syncState() from your…
user3371398
  • 459
  • 1
  • 6
  • 19
13
votes
2 answers

Android ic_drawer.png icon in white color?

I am searching the android icon named ic_drawer.png but in white color. Where can i find it ? Today, in example app, i have found this icon only in gray :
wawanopoulos
  • 9,614
  • 31
  • 111
  • 166
13
votes
2 answers

Android: 2 or more ExpandableListView inside Navigation Drawer

How could I do something like this? Two expandable listview inside navigation drawer. I tryed to add it inside my xml but without luck. What I want is a view with only one scrollbar, but I don't' know how to do it.. this is my navigation drawer…
crc_error
  • 552
  • 1
  • 4
  • 14
13
votes
5 answers

Draggable drawer with a handle (instead of action bar) on top of other apps

Background We all know we can use a navigation drawer as a new way to navigate in an app (even with a library, like this one) . We also know that some apps can float above others (as shown on AirCalc, and done like so) ,using a SYSTEM_ALERT_WINDOW…
android developer
  • 114,585
  • 152
  • 739
  • 1,270
13
votes
3 answers

Android Navigation Drawer bug using the sample

I'm trying to implement the navigation drawer pattern based on my app. I downloaded the sample code from here and i ran it and 90 % of the times the drawer works ok, but sometimes the drawer gets stuck when i try to open it. I have a way of…
xlar8or
  • 601
  • 9
  • 18
13
votes
2 answers

DrawerLayout with Admob ad

I am using Navigation-Drawer in my application.So I have created single activity with navigation_drawer layout.I am using fragments to change main content area(@+id/content_frame) data whenever user chooses a menu option from navigation drawer…
Ansh
  • 2,366
  • 3
  • 31
  • 51
13
votes
3 answers

Cannot resolve symbol DrawerLayout

I'm trying to implement the Navigation Drawer as shown here: http://developer.android.com/training/implementing-navigation/nav-drawer.html#top My code seems to be ok, and My minimum and target levels in my manifest match the example, but it's…
Jhorra
  • 6,233
  • 21
  • 69
  • 123
13
votes
1 answer

New Official Icon for Android Navigation Drawer

How can I use Google's new icon? Is this a resource? Or something you can add in code, such as: actionBar.setDisplayHomeAsUpEnabled(showHomeAsUp) Here is picture from dev site (note: It's the "3 Lines" that I am seeking):
TheLettuceMaster
  • 15,594
  • 48
  • 153
  • 259
12
votes
3 answers

Resource Not Found error res/drawable/abc_switch_thumb_material.xml after adding SwitchCompat in Android App Bundle

I Know this Question has been asked several times i have read them all and have matched all dependencies so that they have same versions but this error only started to happen after adding Switch Compat as you can also see that by going through the…
12
votes
6 answers

navigation drawer issue (not showing layout preview)

I created the app and I want to use navigation drawer menu, but when I tried to edit in navigation drawer xml, then the problem "Waiting for build to finish..." happened and I don't see layout previw on left side of android studio to…
Dr Mido
  • 2,414
  • 4
  • 32
  • 72
12
votes
3 answers

Draw NavigationView header below status bar with NavigationView behind status bar

I have been trying to draw the NavigationView header below the status bar, but it stays behind the status bar. I have already set the property android:fitsSystemWindows="true" for both my DrawerLayout as well as my NavigationView, but to no…