remove fragment from backstack

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

showing results for - "remove fragment from backstack"
Alessia
21 Nov 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();