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
0 answers

cannot install Drawer Navigator. No AAR for react-native-reanimated found. Attempting to build from source

I want to install Drawer Navigator https://reactnavigation.org/docs/drawer-navigator version 6.x first install yarn add @react-navigation/drawer yarn add react-native-gesture-handler react-native-reanimated babel.config.js module.exports =…
1
vote
0 answers

NavigationView not shown, when gravity is "start"

I have following Layout:
Pavel Bernshtam
  • 4,232
  • 8
  • 38
  • 62
1
vote
0 answers

Why does the navigation drawer not navigate when implementing appbar variations?

I'm trying to implement a navigation drawer that supports 2 variations of the app bar. The project has single Activity and top-level destination fragments: some will use the default Toolbar, and some will use CollapsingToolbarLayout with an inner…
DevReis
  • 11
  • 3
1
vote
0 answers

How to set the scaffold drawer fill max width in JetpackCompose?

We can have Navigation Drawer in JetpackCompose by using Scaffold as below Scaffold( drawerContent = { Text(text ="Drawer") } ) {} I want to make the width of the drawer larger. How can I do so? like the green arrow. fun customShape() = object…
1
vote
2 answers

Android Studio. For what is drawerlayout.addDrawerListener() good for?

i wonder why its needed to use for the NavigationBar the following code snippet? actionBarDrawerToggle = new ActionBarDrawerToggle(this, drawerLayout, toolbar, R.string.open, R.string.close); …
steeveKA1
  • 13
  • 6
1
vote
1 answer

OnClick method not working in NavigationView DrawerLayout in Quiz App

I am developing a quiz app where I have a HomeFragment containing a NavigationView with DrawerLayout. I have created a separate class "NavigationHelpline" for binding layouts and implemented OnClickListener on HomeFragment. However, onClick is not…
1
vote
1 answer

drawer navigation is giving error in react native

I added stack and bottom navigator in my app, and it is running correctly. But if I add drawer navigation then I am getting error Below I have added my files App.tsx: import {NavigationContainer} from '@react-navigation/native'; import MainNavigator…
1
vote
1 answer

How can I combine material ui mini variant drawer and code from dark theme switch

I take the example code from the mui mini variant drawer (https://mui.com/material-ui/react-drawer/ and a code for a dark/light theme switch and unfortunately the switch doesn't do a thing: import * as React from 'react'; import { styled, useTheme }…
1
vote
2 answers

Flutter drawer closes on theme change. How can I prevent this?

I am toggling application theme inside Scaffold drawer. Whenever I switch themes drawer immediately closes. Is there any way to keep drawer form closing on parent rebuild due to theme change? return Drawer( child: ListView( //…
Soliev
  • 1,180
  • 1
  • 1
  • 12
1
vote
1 answer

Style Drawer menu toggle button in react native

I'm trying to add some background shade to the toggle button and also increase the size a little more, but I'm unable to find the right prop that targets the button. Here's my code. ({ …
1
vote
0 answers

How can I get access to a fragment of a Navigation Drawer Project?

I am trying to refresh a fragment with the code given in this answer: // Reload current fragment Fragment frg = null; frg = getSupportFragmentManager().findFragmentByTag("Your_Fragment_TAG"); final FragmentTransaction ft =…
user19643881
1
vote
1 answer

Transparent Navigation Drawer with Custom Layout - Android

Trying to make Totally transparent Navigation Drawer with Custom Design (trying to include only Custom layout). Transparent background and Zero elevation in Navigation Drawer. I do not want default header or menu items, I want to add custom design…
TexD
  • 162
  • 1
  • 10
1
vote
0 answers

how to change drawer anchor value based on screen size

how to change drawer position according to screen size in mui(matrial ui) change the anchor value we need to change the anchor value according to screen size like in mobile drawer open right side and in laptop or computer open in left side
jokie me
  • 9
  • 2
1
vote
1 answer

How to Maintain State of Drawer's Child Widget

I have a stateful widget, Counter, with a button and a counter that keeps track of how many times the button was pressed. This widget is in the drawer. When I close and open the drawer again, the counter is reset. How do I make it so that the…
Joel Castro
  • 485
  • 6
  • 20
1
vote
2 answers

Navigation drawer for fragment navigation doesn't know how to go back to main fragment after screen turn off or app going in the background

I have a single activity app that uses navigation graph and a navigation drawer to go to some of the fragments. Pressing back from each of the fragments usually brings me back to the main fragment, UNLESS I turn the screen off and back on or I put…
1 2 3
99
100