I have a zoomable ViewGroup with some childs. User can single-tap the child to select it but can also double-tap the ViewGroup to zoom/un-zoom the canvas.
The problem is if a child handle the onTouchEvent
then the parent can't detect double tap. There is a workaround to this problem?
From the documentation of the onTouchEvent
method "Return true if you have consumed the event, false if you haven't."
I see 2 solutions for this issue:
onTouchEvent
method, because that way the parent will be also notified, and you can handle the double tap on the parent level.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.