Google just posted in their blog a post discussing best practices for implementing the material design. It says:
If the app uses a navigation drawer, it follows the newer material design interactions and styling (Figure 7). The drawer appears in front of the app bar. It also appears semitransparent behind the status bar.
But, if you look at how it is implemented in apps like Google Play Store and Inbox by Gmail, the navigation drawer is located below the Action Bar (Toolbar).
However, apps like Play Newsstand and Pushbullet use their drawer above the toolbar, as recommended. So, which one should I use?
One side note, if I should place the drawer above the toolbar, why did Google implement the animation in the hamburger icon at all(ActionBarDrawerToggle)?
The Navigation Drawer is a powerful component in Android Development which provide easy access to destinations in your app.
DrawerLayout acts as a top-level container for window content that allows for interactive "drawer" views to be pulled out from one or both vertical edges of the window.
Modal navigation drawers block interaction with the rest of an app's content with a scrim. They are elevated above most of the app's UI and don't affect the screen's layout grid. They are primarily used for mobile devices where screen space is limited, and can be replaced by standard drawers on tablet and desktop.
You should use the version from the Material Specs and display your left drawer over the bar.
The width of the NavigationDrawer
on Inbox is also incorrect:
The width of the side nav is equal to the width of the screen minus the height of the action bar, or in this case 56dp from the right edge of the screen.
Mobile: Width = screen width - app bar height
Desktop: Max width for the left nav is 400dp. The right nav can vary depending on content.
The animation also shows when you pull out the right drawer, which should be displayed below the drawer. Further more, your drawer can be (semi-)translucent.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With