how I can pop specific fragment from stack and remove others from a fragment? for example these are my fragments and I\'m in E right know.
A-> B -> C -> D ->E
If you are using AndroidX navigation, you can use the following:
findNavController().popBackStack(R.id.FragmentB, false)