📅  最后修改于: 2022-03-11 14:55:19.590000             🧑  作者: 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();