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
18
votes
2 answers

What's the purpose of tools:openDrawer="start" when creating a DrawerLayout (with NavigationView) from the wizard?

Creating an activity with navigation drawer in Android Studio causes this to be shown in the XML code:
18
votes
4 answers

Android - How to change fragments in the Navigation Drawer

I'm fairly new to Android programming, but have been doing pretty well until now. I've read a lot of answers to this question but can't seem to make mine work. Basically what I have is a MainActivity with a Navigation Drawer. I have two fragments…
18
votes
1 answer

Android-like Navigation Drawer for iOS?

I'm looking for a way to implement in iOS something that works as closely as possible to the Android Navigation Drawer. That's basically a menu panel that slides in from the left and over the current view. I've looked at using…
Mirko N.
  • 10,537
  • 6
  • 38
  • 37
18
votes
2 answers

How to put list items at the bottom of list view in Navigation Drawer like Foursquare

I got a list view for navigation drawer, how can I put list item like "Add Friends", "Settings" align at the bottom of the list view. Update 1 I add a setting view to the footer view. View settingView =…
Edward Chiang
  • 1,133
  • 2
  • 12
  • 24
17
votes
6 answers

Androidx Navigation View - `setNavigationItemSelectedListener` Doesn't Work

What am I doing? I have been trying to work with Androidx Navigation Drawer(). I've read the documentation Here, which says that for handling item selections we can use…
17
votes
7 answers

Android Navigation Architecture Component - Nav Drawer Icons

I'm currently using the Android Architecture Component's Navigation, but I'm running into an issue with my Navigation Drawer. It shows the hamburger menu when at my starting destination, but other Fragments are showing the up arrow. I believe I've…
17
votes
4 answers

Header for DrawerNavigation with react-navigation

I'm on ReactNative and i'm using native-base and react-navigation npm. I got this and my question is how I can have a header, up to the button "Home", I looked into the documentation of react-navigation but it's not really…
Erased
  • 571
  • 4
  • 10
  • 22
17
votes
2 answers

Android navigation drawer toggle icon to right

My requirement is shown in the picture below My navigation drawer should be opened from the right side. I have implemented this. My navigation drawer open from right to left. But the problem is toggle icon is always on the left side. How can I set…
Mithun Sarker Shuvro
  • 3,902
  • 6
  • 32
  • 64
17
votes
4 answers

How to add a collapsible menu item inside navigation drawer in android?

I have a DrawerLayout enclosing a NavigationView and this layout activity serves as a common Navigation drawer for all the activities in my app. I am providing the menu resource for app:menu in navigation view. I have some menu items, but I want one…
17
votes
4 answers

How to add checkbox to material navigation drawer?

I use Menu items Icon Menu but I want to add checkbox to all menu item. This is my drawer_menu.xml
slymnozdmrc
  • 390
  • 2
  • 8
  • 20
17
votes
2 answers

Navigation drawer icon is not centered vertically (landscape mode, Android)

Im having problems with the new way to use toolbar. In landscape mode, toolbar title is centered vertically but the navigation drawer not. How can I solve this? I am using the toolbar like in this post of Chris Banes: AppCompat v21 — Material Design…
17
votes
3 answers

How to create a navigation drawer without support library

I'm working on a Android project that only support API level > 14. As a consequence, we don't use the Android Support Library. I would like to use the navigation drawer with the newer API, but all the documentation I found is about how to create…
Pierre-Jean
  • 1,872
  • 1
  • 15
  • 21
17
votes
2 answers

Android Navigation Drawer on multiple Activities

Is there a way to configure only one time the Navigation Drawer, and the display it on multiple Activites?
Deniz Celebi
  • 888
  • 4
  • 14
  • 24
17
votes
4 answers

navigation drawer google maps v2 , map blocking drawer

I have this problem when opening drawer on gingerbread and behind is google map v2. Map that should be on screen behind gets on top of everything. Now I could bypass this by hiding map when drawer opens and show it when closes but I'm looking for…
Bojan
  • 394
  • 2
  • 14
16
votes
4 answers

How to overcome this item padding in navigation drawer?

I check out all the question and also google a lot I just want to remove this padding between each item in navigation view. Help me to sort out this problem thanks in advance. This is the code of my main_drawer
Abhishek Bhardwaj
  • 1,164
  • 3
  • 14
  • 39