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

Implementing Gmail Tablet like Navigation Drawer

I was looking into the tablet design of Gmail application. In that Navigation Drawer implementation is different from others. I have attached image for your reference. And also when I expand the the drawer it should happen like normal navigation…
Kavin Prabhu
  • 2,307
  • 2
  • 17
  • 36
20
votes
4 answers

How to get items in Navigation Drawer to change view

I want to make an simple app with a Navigation Drawer, which can open other views (News, Information, Gallery, Contact etc). So I opened up the latest Android Studio, made a new project that is compatible with API8>API19, to get maximum reach. I…
20
votes
2 answers

SeekBar in a NavigationDrawer

I want to use a seekbar in a Navigation Drawer Basically I need to slide left and right to set the seekbar and, well, you guessed it, it slides the navigation drawer... What I would like to do is to slide the seekbar when it's focused and the…
nsvir
  • 8,781
  • 10
  • 32
  • 47
20
votes
2 answers

Can't change drawer icon for NavigationDrawer

I'm trying to implement the new NavigationDrawer provided since the last Android keynote. I got everything up and running, the navigation drawer opens and closes when pressing on the icon on the top left corner. But now I still have the arrow icon…
user2410644
  • 3,861
  • 6
  • 39
  • 59
19
votes
2 answers

React Router V4 Implement NavLink inside a ListItem using Material UI

I am new to React and I created a simple application with Login and Dashboard page. I have successfully configured my Public Routes and Private Routes with Redirect functionalities. However when I want to implement material-ui/core Things are still…
KnowledgeSeeker
  • 1,058
  • 2
  • 19
  • 44
19
votes
3 answers

Android Jetpack Navigation - Custom Action with Drawer Item

I am using the new Jetpack Android Navigation in combination with a Drawer Layout. Everything is working as expected when using the same IDs in the Drawer XML in combination with Fragments in the Navigation Graph. I set everything up with: override…
19
votes
2 answers

Properly handle DrawerLayout animation while navigating through fragment

I'm currently struggling with the DrawerLayout animation doing weird stuff; The hamburger icon is laggy and often switch from hamburger to arrow without animation if I don't put an Handler to delay the fragment transaction animation. So I ended up…
Jaythaking
  • 2,200
  • 4
  • 25
  • 67
19
votes
6 answers

Implementing proper back navigation and home button handling using Toolbar in Android

I am using a single activity and multiple fragments(screenshot attached) within the same activity to provide a seamless navigation. But after implementing the latest toolbar and navigation view, it seems hard to handle the navigation and home…
19
votes
2 answers

How to keep single checkableBehavior mode in drawer menu for NavigationView when we add section?

I try to implement a drawer with new component of material design : NavigationView. It's work very well. When I select an item changes its color change well with android:checkableBehavior="single".
lopez.mikhael
  • 9,943
  • 19
  • 67
  • 110
19
votes
5 answers

What is the navigation drawer icons size?

I need to know the correct size (artboard and content) for Navigation Drawer icons. It doesn't say anything on the Navigation Drawer specs: http://www.google.com.br/design/spec/patterns/navigation-drawer.html#navigation-drawer-specs Thanks!
19
votes
4 answers

Get Toolbar's navigation icon view reference

I would like to highlight drawer icon in my Toolbar (working on a tutorial). For that, I need its position. How do I get a reference to drawer's navigation icon (hamburger) view?
Singed
  • 1,053
  • 3
  • 11
  • 28
19
votes
3 answers

Robotium UI testing for app with Navigation Drawer

We got the app with Navigation Drawer from support.v4 library. We automating UI testing with Robotium and everything is ok, but Navigation Drawer can freeze randomly so some tests can fail randomly. This is definitely not a Robotium problem, because…
Artem Zinnatullin
  • 4,305
  • 1
  • 29
  • 43
19
votes
1 answer

Collapsible List Item in navigation Drawer

I have read the documentation of android Navigation Drawer but there is nothing on how to create collapsible/expandable List item in navigation drawer. I know something about android ExpandableListView but I think it is not the way to create it. I…
Kaidul
  • 15,409
  • 15
  • 81
  • 150
18
votes
6 answers

How to close navigation DrawerLayout onBackPressed in Navigation Controls Fragment

I have created an Androidx project with Navigation pattern. Now I want to close drawerLayout onBackPressed() in fragment. And also I want to set OnClickListener to drawer menu items to my custom menu there is no way I guess to override the…
Arbaz Pirwani
  • 935
  • 7
  • 22
18
votes
4 answers

Navigation Drawer and VideoView in android

I am using a navigation drawer plus a tablayout. I have a video in my tab which was not visible at first, but I can hear the sound. Once I set video_view.setZOrderOnTop(true); and I can also see the video, but this causes an issue with navigation…
Atula
  • 2,177
  • 2
  • 12
  • 28