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
1
vote
2 answers

How to enable navigation drawer only when we are in a certain fragment?

I want to set my navigation drawer menu on a Fragment. I don't want the navigation drawer to show up when I start my app. I want it to show up after I enter another page (i.e. not first page). But the problem is, onSupportNavigateUp can only be…
1
vote
1 answer

How to hide hamburger icon on a certain fragment?

Let's say I have 5 fragments (a,b,c,d,e) and I want to hide the hamburger icon on fragment a, but show the hamburger icon on fragment b,c,d,e. Is there a way to do this?
1
vote
1 answer

How to align the drawer navigation items to bottom of the screen in react native?

I have a drawer navigation with permanent drawer type and I want to align the drawer items to bottom of the screen instead of the top. Like this photo: The code I used to align the did not work for me: drawerStyle: { backgroundColor:…
Mahdi
  • 206
  • 2
  • 14
1
vote
1 answer

Switch between Hamburger icon and Back arrow icon in navigation drawer in spcific fragment not working

I am trying to change the navigation icon when opening the settings fragment using this way and this but both not working I am still seeing the hamburger icon in the settings fragment MainActivity @AndroidEntryPoint class MainActivity :…
Dr Mido
  • 2,414
  • 4
  • 32
  • 72
1
vote
1 answer

Drawer Navigation menu click listener is not working How to solve this?

Drawer Navigation works normally, but when an item is clicked, no event is generated and Navigation is terminated. Which event listener should I use? I want to use the Drawer Navigation by clicking on the imageview. The opening of Drawer Navigation…
jyk
  • 21
  • 4
1
vote
1 answer

migrate from MaterialComponents to Material 3, how to use my old custom colors for new version of material

I am trying to migrate my current app from MaterialComponents to use newset version Material3 I want to use my old colors (custom colors) for the toolbars and navigation drawer but I am a little bit confused about many attributes that changed and I…
1
vote
2 answers

How to hide admin menu from user Flutter navigation drawer

I'm trying to hide the admin menu from normal users. Storing login response and role in shared preferences, where isAdmin variable has boolean data, where its stored login provider. Please find the code which I tried: [ buildMenuItem( text:…
1
vote
1 answer

Trying to change the starting fragment causes the navigation drawer to malfunction

I am having a hard time understanding what I am doing wrong, so I hope you'll be able to help me. Context : I am building an Android application using Android Studio to control and monitor my IoT devices in my house. I started with the Navigation…
1
vote
2 answers

NavigationUI set custom navigation icon

With the Jetpack Navigation Library, the usual solutions to change hamburger menu icon in toolbar don't work, including: toolbar.setNavigationIcon(R.drawable.my_drawer) or getSupportActionbar().setIcon(R.drawable.my_drawer) ^ both these methods…
Ishaan Garg
  • 3,014
  • 3
  • 25
  • 28
1
vote
1 answer

How to add Badge on hamburger navigation menu icon with BadgeDrawable?

I add Badge on a button like this way. I want to add Badge on hamburger navigation menu icon with this way but I don't know how. I found a few solutions but none use BadgeDrawable. This is my code but the result is not what I want : activity_main…
1
vote
0 answers

Android DrawerLayout NavigationView exapandable menu item with one item fixed at bottom

what is latest way to implement expandable menu item with sign out as item at bottom fixed. on DrawerLayout NavigationView exapandable menu item should have a expandable item like this. I dont want to use library as library will be outdated with…
Feroz Siddiqui
  • 3,840
  • 6
  • 34
  • 69
1
vote
1 answer

Flutter : Drawer without seeing the white page

When I click on the Three Line icon in the AppBar, I first go to a blank white page. Then when I pull the mouse from the left on this page, I see "Drawer". The white page confuses me. What I want is; That the Drawer comes from the left as I click on…
1
vote
2 answers

How to get rid of extra space after resizing Drawer in Material UI?

I resized my sample MUI drawer with a specific width. The problem I have now is that I have an extra space left after resizing my drawer, thus leaving out my text contents of lorem ipsum with a "margin-like" space. I want to make the text to be…
Ralph Henry
  • 122
  • 1
  • 13
1
vote
2 answers

How to change the content inside a Scaffold that exists inside drawer in Jetpack Compose?

I have this drawer: val drawerState = rememberDrawerState(DrawerValue.Closed) val scope = rememberCoroutineScope() val items = listOf(Icons.Default.Favorite, Icons.Default.Face, Icons.Default.Email) val selectedItem = remember {…
1
vote
2 answers

Different action menu items for each fragment with same navigation drawer in Android

I have a Main activity that hosts a navigation drawer and multiple fragments. Each fragment has its own set of menu items. Now the problem starts when I add the onOptionsItemSelected method, the navigation Drawer won't open. And when I don't add the…
1 2 3
99
100