Ad

I Have Some Problems With DrawerLayout

- 1 answer

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?

Ad

Answer

Please lock it with

drawerLayout.setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_CLOSED);

and unlock with

DrawerLayout.setDrawerLockMode(DrawerLayout.LOCK_MODE_UNLOCKED);
Ad
source: stackoverflow.com
Ad