Dispatch Touch event from DialogFragment view to parent activity view

In the end, as Luksprog suggested, I ended up with ditching DialogFragment. I did a test using simple Fragment which is hosted in an activity's FrameLayout so it looks just like an overlay on where I need it. In this way I still get all the interaction I need with the rest of the views.

Thank you all for your support.


I had the same problem with BottomSheetDialog. I solved my problem:

final BottomSheetDialog dialog = getDialog();
final View touchOutside = dialog.findViewById(R.id.touch_outside);
touchOutside.setOnTouchListener((v, event) -> {
    getActivity().dispatchTouchEvent(event);
    return false;
});

So looks like solution of Finn should work correctly.