java - Placing layouts on top of each other - problem
问题描述
I have a relative layout tree, let's say that I have a couple of buttons in root layout and other one is placed on top of the buttons, covering them with it's backgound.
Visually everything is ok, but I still can activate invsible buttons placed under the layout, is there any property related to this?
I have tried elevation, translationZ, etc. I would like to avoid programatically fixing the problem (isShown for example), is there anything else I can change in xml to prevent them from activating?
解决方案
在您的布局 xml 文件中,添加setClickable="true"
到您设置背景的相同布局。
推荐阅读
- mysql - Nodejs 异步/等待 MySQL 查询
- python - 无法减去两个日期时间列
- javascript - react-native 文件上传到适用于 iOS 但不适用于 Android 的服务器
- android - 我对 DrawerLayout 有一些问题
- reactjs - React 导入多个函数
- chart.js - Chart.js - 删除 Y 轴上的零和步数
- python-3.x - 修改大型数据集时出现 Python3 内存错误
- excel - 获取网页中的 td 项目
- c++ - 使用 MAKEWORD 函数会产生错误 E0109- 明显调用的括号前的表达式必须具有 (pointer-to-) 函数类型
- android - 是否可以同时录制 2 个视频源?