📜  从 backstack 中删除片段 - Java 代码示例

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

代码示例1
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();