4

I have an application which is having a home Activity, in that i have used viewpager,Appcompact Actionbar and drawerLayout. The drawerLayout opens in three events.

  1. Clicking on actionbar menu.
  2. Device menu button
  3. Swipe to right from edge

and closes when

  1. Clicking on actionbar menu
  2. Device menu button
  3. swipe to left or clicking the fade portion

I just wanted to disable opening drawerLayout when swiping from edge.

I have used this,

mDrawerLayout.setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_OPEN);
mDrawerLayout.setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_CLOSED);

this methods disabled both swipe open and close events,

If any body done this tell me how to disable swipe to open DrawerLayout.

Sujith
  • 7,543
  • 1
  • 28
  • 38

0 Answers0