I have some problems with DrawerLayout

I'm working with DrawerLayout in my program, and my program has only one activity, and many fragments. When I open new fragment how can I block DrawerLayout, and when I close the fragment(back to HomePage) how can I unblock the DrawerLayout, please help me choose correct way?

Upvotes: 2

Views: 110

Answers (3)

user11930648
user11930648

Reputation:

You can use drawer.setDrawerLockMode(); where the inside parameter can be:

DrawerLayout.LOCK_MODE_UNLOCKED or DrawerLayout.LOCK_MODE_LOCKED_CLOSED

Upvotes: 0

DAS
DAS

Reputation: 452

Please lock it with

drawerLayout.setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_CLOSED);

and unlock with

DrawerLayout.setDrawerLockMode(DrawerLayout.LOCK_MODE_UNLOCKED);

Upvotes: 2

apksherlock
apksherlock

Reputation: 8371

Well you can use drawer.setDrawerLockMode(); where the inside parameter can be:

DrawerLayout.LOCK_MODE_UNLOCKED or DrawerLayout.LOCK_MODE_LOCKED_CLOSED

Upvotes: 1

Related Questions