0

Is there a way to make Android's new DrawerLayout permanently open?

I want it for the Tablet design, but I didn't find anything on Google's documentations.

Anyone knows anything?

orelzion
  • 2,452
  • 4
  • 30
  • 46

2 Answers2

1

this is method to disable swipe to open

drawerLayout.setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_OPEN);

Nantaphop
  • 570
  • 2
  • 13
0

I agree with the comments. That kind of defeats the purpose of the drawer layout. To answer the question though, there are 2 ways to open the DrawerLayout.

  1. You have to call drawerLayout.closeDrawer(navDrawerList); or drawerLayout.openDrawer(navDrawerList); when the user presses something. As expected the respective call will close or open the navigation drawer.

  2. The drawer can be opened via a Bezel swipe (A swipe from the very edge of the phone on the side of the nav drawer). I currently know of no way to disable the Bezel swipe.

Hope this helps.

spierce7
  • 14,797
  • 13
  • 65
  • 106