I am creating a fullscreen dialog like described here Showing a Dialog Fullscreen or as an Embedded Fragment.
So when I want to open this fullscreen dialog from my fragment I do:
FragmentTransaction transaction = getActivity()
.getSupportFragmentManager()
.beginTransaction();
transaction.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN);
transaction.add(android.R.id.content, newFragment)
.addToBackStack(null)
.commit();
However there seems to be one problem with this. When I tap on the screen not only the dialog fragment receives touch events but the underlaying host fragment as well. So it happens that by tapping around an action is triggered in the host fragment.
Why does this happen? The host fragment should not receive touch events!?
I could solve this by not adding but replacing the host fragment with the dialog fragment but this will break the back stack.