android - overdraw layout allows touch through LinearLayout

五迷三道 提交于 2019-12-03 05:00:41

Just setting the android:clickable="true" property for the LinearLayout in the XML will prevent the clicks going through -- no need for a click listener.

Assigned a click to Linear Layout and that solved it. Honestly it should not be working like this to begin with but that solved the problem. The click is empty.

What worked for me was to put the LinearLayout before the inner RelativeLayout in the xml.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!