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?
Please lock it with
drawerLayout.setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_CLOSED);
and unlock with
DrawerLayout.setDrawerLockMode(DrawerLayout.LOCK_MODE_UNLOCKED);
Well you can use drawer.setDrawerLockMode();
where the inside parameter can be:
DrawerLayout.LOCK_MODE_UNLOCKED
or DrawerLayout.LOCK_MODE_LOCKED_CLOSED
You can use drawer.setDrawerLockMode(); where the inside parameter can be:
DrawerLayout.LOCK_MODE_UNLOCKED or DrawerLayout.LOCK_MODE_LOCKED_CLOSED
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.