Search code examples
androidviewandroid-fragmentsandroid-activitytouch-event

Pass touches to the view under


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!


Solution

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