I want to disable the opening of a drawer via swipe, but not the closing via the swipe or back button.
I'm using fragments in my drawer, so that when the drawer opens I replace my fragment and add it to the backstack. On pressing the backbutton, the drawer closes as aspected.
But when I use
mDrawerLayout.setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_CLOSED);
like in this post: disable the swipe gesture that opens the navigation drawer in android it disables ALL swipes und the backbutton navigation. The only way to close the drawer now is to touch the screen outside of the drawer.
Is there an alterantive to the LockMode and preserve the swipe close and backbutton navigation?
Note: I'm using Android 5.0.1