📜  popbackstack 片段如何在包中传递值 - 任何代码示例

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

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