Hi, I have a problem:

I have a ViewGroup (LinearLayout) that holds one or more Fragments,
each containing a WebView.
I have a custom OnTouchListener for my ViewGroup that will react to
special events like touches on the screen borders. If none of these
special events is detected, the touch event should be passed to the
WebView.
The problem is that the WebView is the first element to get the touch
event and there does not seem to be a way to delegate the touch event
to the underlying View.
How can I modify the touch hierarchy in a way that the ViewGroup
receives the TouchEvent first and only if it doesn’t consume the event
it is passed to the WebView?

I made an example project to illustrate my problem at
https://github.com/pcomans/WebViewTouchTest

I have chosen to add two fragments containing a WebView in order to
make clear that it is not enough to just override the
setOnTouchListener of the WebView instead. I am interested in the
absolute position of the touch. Sure I could probably calculate the
absolute position from the relative position but this is not an
elegant solution.

I would really appreciate any help!

Best,

Philipp

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to