简体   繁体   English

Android:打开导航抽屉时与内容视图进行交互

[英]Android: Interact with content view when navigation drawer is open

I have a navigation drawer that is always open I am doing it as follows: 我有一个始终打开的导航抽屉,具体操作如下:

mDrawer.setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_OPEN);
mDrawer.setScrimColor(Color.TRANSPARENT);

But now I want to intetract with the content view when the navigation drawer is open. 但是现在,当导航抽屉打开时,我想使用内容视图。 When I tap a button on the content view nothing happens. 当我点击内容视图上的按钮时,没有任何反应。 How to interact with the content view when the navigation drawer is open? 打开导航抽屉时如何与内容视图交互?

Navigation drawers are not made for that. 导航抽屉不是为此而设计的。 You can make your own custom fragment and animate it like a drawer. 您可以制作自己的自定义片段,并像抽屉一样对其进行动画处理。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM