📜  如何从导航组件中的后台堆栈中删除片段 - 任何代码示例

📅  最后修改于: 2022-03-11 14:56:06.783000             🧑  作者: Mango

代码示例2
You add to the back state from the FragmentTransaction and remove from the backstack using FragmentManager pop methods:

FragmentManager manager = getActivity().getSupportFragmentManager();
FragmentTransaction trans = manager.beginTransaction();
trans.remove(myFrag);
trans.commit();
manager.popBackStack();