简体   繁体   English

如何在Android中滑动抽屉内容后面的无效元素?

[英]How to inactive elements behind sliding drawer content in Android?

I currently have a ListView with clickable items. 我目前有一个带有可单击项的ListView Then I have a sliding drawer with content containing nothing but 50% transparent black background which fills parent in both directions. 然后,我有一个滑动抽屉,其内容只包含50%透明的黑色背景,在两个方向上都填充了父级。

The issue is when I click on the sliding drawer content layer (anywhere in black background) it triggers click on listview item which is beneath it. 问题是,当我单击滑动抽屉式内容层(黑色背景中的任意位置)时,它会触发对其下方的 listview项的单击。

How do I make so that anything behind sliding drawer content layout is inactive? 如何使滑动抽屉内容布局后面的所有内容都无效?

(I tried setting clickable to false on the content layout and it didn't help) (我尝试将内容布局上的clickable设置为false,这没有帮助)

我认为您应该将滑动抽屉的内容布局的可点击状态设置为true

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

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