Friday, 9 August 2013

Manually passing an onTouchEvent to a view's parent

Manually passing an onTouchEvent to a view's parent

From a child view's onTouchEvent (say a TextView that is within a
ListView), I was wondering what method to call if I wanted to manually
forward this event to its parent.
I know I can simply call super.onTouchEvent() from the TextView's
override, but I want to call the parent view manually, if possible.
I've been looking at the source, and don't see any call to the effect of
parent.onTouchEvent(e)
and so was wondering how this is done ? I'm thinking maybe there is a
viewTreeObserver at play here, but not too sure.
Thank you.

No comments:

Post a Comment