Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Children not clickable outside parent view

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?

enter image description here

like image 454
HansElsen Avatar asked May 07 '18 11:05

HansElsen


1 Answers

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:

solution

like image 94
HansElsen Avatar answered Oct 22 '22 23:10

HansElsen