user1627990 user1627990 - 2 months ago 30
Android Question

disable the swipe gesture that opens the navigation drawer in android

I've been following the navigation drawer guide by Google and I'd like to add it to an Activity with tabs and gestures.

I'd like to disable the gesture to open the navigation drawer, does anyone have any idea how to do this?

Answer

You should use:

mDrawerLayout.setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_CLOSED);

It work with me, The swipe to open the drawer was disabled.

If it still won't work, check out the answer provided here.

Comments