[英]I have some problems with DrawerLayout
I'm working with DrawerLayout in my program, and my program has only one activity, and many fragments. 我在程序中使用DrawerLayout,并且我的程序只有一个活动和很多片段。 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?
当我打开新片段时,如何阻止DrawerLayout,当我关闭片段时(返回首页)如何解除对DrawerLayout的阻止,请帮助我选择正确的方法?
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();
好吧,您可以使用
drawer.setDrawerLockMode();
where the inside parameter can be: 内部参数可以是:
DrawerLayout.LOCK_MODE_UNLOCKED
or DrawerLayout.LOCK_MODE_LOCKED_CLOSED
DrawerLayout.LOCK_MODE_UNLOCKED
或DrawerLayout.LOCK_MODE_LOCKED_CLOSED
You can use drawer.setDrawerLockMode(); 您可以使用抽屉.setDrawerLockMode(); where the inside parameter can be:
内部参数可以是:
DrawerLayout.LOCK_MODE_UNLOCKED or DrawerLayout.LOCK_MODE_LOCKED_CLOSED DrawerLayout.LOCK_MODE_UNLOCKED或DrawerLayout.LOCK_MODE_LOCKED_CLOSED
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.