Children not clickable outside parent view

雨燕双飞 提交于 2019-12-10 16:57:05

问题


I have a created a mapview with markers on it. Looking at this picture below:
Grandparent is a filling View
Parent is my MarkerView
Child is a marker which is clickable

Parent has clipChildren(false) and thus the children are visible.

My problem is that the children are clickable, except for the part where Child 2 is outside the Parent. Parent also has the appropriate TouchDelegate (and I also tried this for the children).

How can I make the complete child clickable?


回答1:


I couldn't make it work without changing the elements.
I ended up enlarging the parent and using setTranslationY for the markers to keep them in place like this:




回答2:


I had a similar issue and fixed it by setting app:elevation="XXdp" to the child.



来源:https://stackoverflow.com/questions/50213140/children-not-clickable-outside-parent-view

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