I have an app in which I'm using a BottomSheetDialogFragment and inside the Dialog I have a ViewPager2 that I use to scroll horizontally between two Fragments.
If I drag down from outside the rest of the dialog, I can close it, while if I drag down from inside the ViewPager2, I can't.
The second of the two fragments contains a RecyclerView, so that is the behavior that I want, but the first one doesn't. How can I make it that if I drag down vertically from inside the first fragment the touch event is passed to the BottomSheetDialogFragment so that it can handle it (and close itself)?