When I replace a Fragment
with another Fragment, the replaced Fragment is still behind the new Fragment and the clickable events in the replaced Fragment are still working. I can't see any of the old Fragment, but the touch events are still working.
I tried even clearing the backstack before replacing but to no avail.
Why is this happening?
getSupportFragmentManager().popBackStack(null, FragmentManager.POP_BACK_STACK_INCLUSIVE);
getSupportFragmentManager().beginTransaction().replace(R.id.container,
MatchedFragment.newInstance(matchHistoryId, matchUserId, matchAvatar), "matchedFragment").commit();