问题
I have a created a mapview with markers on it.
Looking at this picture below:Grandparent
is a filling ViewParent
is my MarkerViewChild
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