Navigation Drawer without Actionbar

Chinmay Dabke picture Chinmay Dabke · Jan 7, 2014 · Viewed 33.9k times · Source

I searched many sites (stackoverflow as well) but couldn't understand how to implement the navigation drawer without the action bar. I know that this question has already been asked here but it doesn't have a proper explanation and code. I am a beginner in android development so can anyone please explain me with code How to make a navigation drawer without an action bar

Thanks in advance!

Answer

Mehdiway picture Mehdiway · Jun 4, 2015

Just add your DrawerLayout like @mohan did, then if you have a button or something you tap on and want to open the drawer, just do like this :

drawer.openDrawer(Gravity.LEFT);

and to close :

drawer.closeDrawer(Gravity.LEFT);