Pass touches to the view under

roiberg picture roiberg · Oct 30, 2013 · Viewed 33.1k times · Source

In my app I have a fragment on top of the activity. The fragment is filling the whole screen. Part of the fragment is a transparent View and you can see the views under (that belong to the activity). Is there a way to transfer the touch events to the views that are under the transparent View of the fragment? Thanks!

Answer

Maciej Boguta picture Maciej Boguta · Oct 30, 2013

In your overriden onTouchEvent method inside the fragment return false, it passes the touch event to the lower layer views.