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
14
votes
1 answer

What is ScrimInsetsFrameLayout?

What is ScrimInsetsFrameLayout? I am working in Navigation Drawer with ToolBar,In most of the tutorial they using ScrimInsetsFrameLayout, For what purpose it use can any one explain breif?
appukrb
  • 1,507
  • 4
  • 24
  • 53
14
votes
4 answers

Android Navigation Drawer Fragment State

I'm currently utilizing the Navigation Drawer for my Android APP. In my first fragment, I've a fragment that loads data using Facebook's Graph API. Thus, when my App is first loaded, it first goes to the first fragment. Then, I use the Navigation…
14
votes
2 answers

i want to make slide menu with 3D effect like the below image

I am able to make the slider by using this code. But I dont know how to make it in 3D. import android.os.Bundle; import android.support.v4.app.Fragment; import android.support.v7.app.ActionBarActivity; import android.view.LayoutInflater; import…
Pankaj Arora
  • 10,224
  • 2
  • 37
  • 59
14
votes
1 answer

How to disable swipe of only the right navigation drawer?

I have two navigation drawers on either side in my Activity. I don't need the right navigation drawer to be opened by a swipe gesture. If I use: mDrawerLayout.setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_CLOSED) to lock the swipe then both the…
DevAndroid
  • 1,150
  • 1
  • 10
  • 23
14
votes
2 answers

How to open a new fragment from the navigation drawer?

I'm using developer.android.com guides to build an app. I choosed "Navigation: Navigation Drawer" when I made a new project in Android Studio. I have searched the internet for answers to my questions but I can't find any that works. Sorry about…
johgru
  • 241
  • 2
  • 5
  • 20
13
votes
4 answers

Resource IDs will be non-final by default in Android Gradle Plugin version 8.0, avoid using them in switch case statements

I have a warning in Android Studio about my navigation drawer resources. Warning is: Resource IDs will be non-final by default in Android Gradle Plugin version 8.0, avoid using them in switch case statements. I tried to use the method if to update…
D4rK
  • 329
  • 4
  • 12
13
votes
2 answers

setDrawerLayout(androidx.drawerlayout.widget.DrawerLayout) is deprecated

I am trying set up Navigation Drawer Layout with App Bar Configuration using the new Android Architecture. The problem am having is that android studio is telling me the way am setting up the drawer layout is deprecated. Here is my xml…
13
votes
4 answers

Navigation drawer item click listener not working

Sorry for the silly question i am amateur in android studio and learning now. I have tried a lot but the click listener is not working please help. i have used the android studio's default drawer layout.navigation is working but i want to perform a…
Honey samresH
  • 143
  • 1
  • 1
  • 7
13
votes
3 answers

How to change hamburger icon in Android (NavigationDrawer)

Before write this thread I have try to implement the different solution that I found in stackoverflow, but nothing work properly. I'm developing an Android applucation that use the custom navigation drawer, I have to change the standard icon of…
Mattia
  • 1,057
  • 2
  • 17
  • 33
13
votes
3 answers

How to hide navigation drawer when opening certain fragment?

I'm pretty new in android development. I want to hide navigation drawer when user is not logged in. So basically, it will shown login fragment (better in full screen like Facebook android). And if user already logged in, navigation drawer will…
adadion
  • 746
  • 1
  • 10
  • 24
13
votes
3 answers

change navigation drawer selected item on fragment backstack change

I have two fragments FragmentHome and FragmentAbout, I have added NavigationDrawer to app when I click Home it opens FragmentHome and About opens FragmentAbout, when I open FragmentAbout I am also adding it to backstack. This is working fine. Now…
13
votes
2 answers

ActionLayout for navigationview items displays on right side

I'm developing an application where I'm using new design support library's navigation view controller for drawer menu. Everything is working fine. I've set items for navigation view using app:menu attribute. Item's are perfectly displayed. Now i'm…
Amrut
  • 2,655
  • 3
  • 24
  • 44
13
votes
3 answers

How to open sub menu after click on menu-item in Navigation drawer?

I implemented a navigation drawer, with navigation view. and i am adding value in navigation view through a menu.xml…
Himanshu Shekher Jha
  • 1,334
  • 2
  • 14
  • 27
13
votes
2 answers

How to create mini-drawer menu in Android?

I am looking to create a mini-drawer menu like in google example: I have tried to create a layout that always stays there on ParentLeft, and the menu to overflow it when it opens, but it does not look natural. Does anyone know how do I do…
Filip Luchianenco
  • 6,912
  • 9
  • 41
  • 63
13
votes
9 answers

Switch in Navigation drawer item with Design Support Library on Android

I need to put Switch inside item in navigation drawer. I'm using new design support library, but I cannot find if it is posibble at all. When using android:checkable item is just full selected and that is not what I wish. This is screenshot of…