Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Touch anywhere to slide open menu for navigation drawer

Tags:

For Sliding menu by jfeinstein10 (https://github.com/jfeinstein10/SlidingMenu), I can slide anywhere in the app to slide open the menu.

For Google newly introduced navigation drawer http://developer.android.com/design/patterns/navigation-drawer.html#side-nav, is there any way I can have similar behaviour?

So far, from documentation, I saw it only limit to slide from edge or touching the app icon.

The user can bring the navigation drawer onto the screen by swiping from the left edge of the screen or by touching the application icon on the action bar.

like image 720
Cheok Yan Cheng Avatar asked May 16 '13 09:05

Cheok Yan Cheng


People also ask

How do I customize my navigation drawer?

Android App Development for BeginnersStep 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project. Step 2 − Add the following code to res/layout/activity_main. xml. Step 3 − Add the following code to res/layout/nav_header_main.

How does navigation drawer work?

Add a navigation drawer The navigation drawer is a UI panel that shows your app's main navigation menu. The drawer appears when the user touches the drawer icon in the app bar or when the user swipes a finger from the left edge of the screen.


1 Answers

I have found a solution. You can configure margin of touch and make it as wide as your view is. Here is the link

Set drag margin for Android Navigation Drawer

like image 123
Maxim Efimov Avatar answered Sep 20 '22 13:09

Maxim Efimov