Custom Navigation Drawer like Gmail and YouTube - android

I would like to create my own Navigation Drawer
using the current Material Design for the Navigation Drawer.
A good example of this implementation is the YouTube app.
In the App the Navigation Drawer overlaps the Action bar and is not below the action bar like in previous implementations.
I've tried following some example from other people's tutorials but they fall short of what I want. I have included some of the implementations that I have tried. I do not want to use a Library,
I want to implement it . Is there currently a tutorial that applies the Material Design Patterns properly.
YouTube Navigation Drawer
http://www.google.com/design/spec/patterns/navigation-drawer.html#

I used https://github.com/chrisbanes/cheesesquare as a reference. However I came across this tutorial that provides a proper guide on how to create a material design navigation drawer whilist also handling the click events of menu items
https://guides.codepath.com/android/Fragment-Navigation-Drawer

Related

Mixing bottom app bar and floating action button (FAB)

I want to use BottomNavigation and FloatingActionButton at the same time in Android and there is nothing like this in google material components and also I didn't find any third party library which implements something like this. Attached GIF demonstrate what I want to implement. In fact I want a bottom navigation that one of its tabs has a FAB which placed on the navigation bar and the FAB disappears when another tab is selected.
See the attached image here.
You won't find a Material component for the layout in your example since it's counter to the Material Design Spec.
Floating Action Button (FAB) represents the primary action of a screen
The example would provide multiple "primary" interactions since its mixed with navigation. I would not recommend using the FAB in the context of a bottom navigation bar. Instead, separate them visually for the user's benefit by moving the FAB up and to the right of the page. Here are the Material Docs for Extending the FAB
Now you don't have to follow the Material Spec BUT you shouldn't expect pre-built Material components to ignore it.

How to replace default hamburger icon with custom drawable (Used latest NavigationView, design support library, tool bar))

I have followed exact steps in the following tutorial for making navigation drawer using design support library. But i want to replace the default hamburger icon (using drawerToggle.syncState()). How can i do it?
https://github.com/codepath/android_guides/wiki/Fragment-Navigation-Drawer
Also I want to make Navigation drawer switch activities instead of fragments. For this, i have made a BaseActivity following above tutorial and extended all other activities from this BaseActivity. I am able to get the result but when a new activity is launched unable to preserve the highlighting of selected item in navigation drawer. Please suggest any solutions?

Is Android Navigation drawer supposed to be over ActionBar?

As the title suggests, my app uses a side menu using navigation drawer. I got inspired by this official google doc and its nav drawer can be toggled either by swipe from left to right or by clicking on modified home icon on top left of ActionBar.
When nav drawer is drawn, the drawer icon in Actionbar is replaced by back button which in change closes the drawer and returns actionbar to its original state.
But this is where I find problems. As in this different official google doc about material design it is clearly stated that drawer should be over actionbar covering it.
I checked e.g. gmail app uses the latter, i.e. drawer over ActionBar.
Should I follow guidelines #1 or #2?
"The wonderful think about standards is that there are so many to choose from." — Admiral Grace Hopper
I'll start by pointing out that the first link you referenced that talks about closing the drawer by clicking the icon is pre-Material Design. So my choice would be to go with the Material Design-specific recommendation.
Now take a look at this:
The Many Faces Of Google's Hamburger Navigation Drawer | Android Police
Material Navigation Drawer isn't even consistent within Google's own apps.
I think some UX people feel that there should still be a single-touch way to close the drawer in addition to the swipe. Looks like even the dev teams within Google can't come to a consensus.
So consider all your options, then do what makes the most sense for your app.

Navigation Drawer + Sliding Tabs inside fragment Android

I'm trying to get a NavigationDrawer working with sliding tabs inside a fragment (just like google play music or the google i/o app). In all my reasearch I found that you can't use Action bar tabs + Navigation Drawer together because the Navigation drawer will look like in the back of the tabs (I notice that). Can anyone help me telling me how to get that done without use an external library such ActionBarSherlock or TabHost (according to the documentation is recommended the use of actionbar)?
Yes, you're right. It won't be possible using ActionBar tabs as the navigation drawer won't overlap them. I recently implemented a library called ViewPagerAddons which has a custom view called SlidingTabLayoutColors imitating the behavior seen in Google Play/Music.
But as you said you don't want to use any libraries, you can still have a look at the source code. Here's the link with instructions: https://bitbucket.org/enthusiast94/viewpageraddons

how to customize google navigation drawer?

i was using sliding menu drawer it was awesome,and now switched to Google navigation drawer.but i don't know how to customize like font,color,gravity,spacing,etc
Have you looked at Google's documentation? It explains it very well. You can define the layout (including font, color, margins, etc.) for the navigation drawer in XML like you would any other layout. Here is the link to Google's documentation and tutorial: http://developer.android.com/training/implementing-navigation/nav-drawer.html
Don´t forget about custimizing yours navigation drrawer listView! You could add very nice details with headers and so on.

Categories

Resources