📅  最后修改于: 2022-03-11 14:52:31.593000             🧑  作者: Mango
FragmentTransaction ft = getActivity().getFragmentManager().beginTransaction();
FragmentB frgamentB = new FrgamentB();
fragmentB.setTargetFragment(FrgamentA.this, AppConstant.FRAGMENT_CODE);
ft.addToBackStack(fragment.getClass().getName());
ft.add(R.id.content, fragment, tag);
ft.commit();