导航抽屉 - 禁止通过点击抽屉后面的物品 [英] Navigation drawer - Disable click through on items behind the drawer

查看:260
本文介绍了导航抽屉 - 禁止通过点击抽屉后面的物品的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有什么办法,以确保导航抽屉停留在片段中内容的顶部?

Is there any way to make sure that the navigation drawer stays on top of the content in the fragment?

我创建了一个小的测试应用程序虚拟数据。 10个片段与相应编号的按钮和TextView中。这个问题是这样一个事实,该片段元素似乎具有更高的优先级比导航抽屉。

I created a small test application with dummy data. 10 fragments with a corresponding numbered button and textview. The issue is with the fact that the fragment elements seem to have higher priority than the navigation drawer.

正如看到的截图,有一次我试图开辟0片段它,而不是选择只登记在导航抽屉后面的按钮点击。 pressing任何其他内容项目工作正常,但是这是因为只要有它们下面没有其他的相互作用性项目。我能做些什么有抽屉式导航适当留在它后面的内容之上?

As seen in the screenshot, once I attempt to open up the "0 fragment" it instead opts to register the click on the button behind the navigation drawer. Pressing any other content item works fine, but this is as long as there are no other interactable items beneath them. What can I do to have the navigation drawer properly stay on top of the content behind it?

推荐答案

设置机器人:可点击=真标签上的滑动面板布局

Set android:clickable="true" tag on sliding pane layout.

这篇关于导航抽屉 - 禁止通过点击抽屉后面的物品的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆