how to remove backstack fragment

Solutions on MaxInterview for how to remove backstack fragment by the best coders in the world

showing results for - "how to remove backstack fragment"
Kaliyah
03 Oct 2019
1You add to the back state from the FragmentTransaction and remove from the backstack using FragmentManager pop methods:
2
3FragmentManager manager = getActivity().getSupportFragmentManager();
4FragmentTransaction trans = manager.beginTransaction();
5trans.remove(myFrag);
6trans.commit();
7manager.popBackStack();