1 FragmentTransaction ft = getActivity().getFragmentManager().beginTransaction();
2 FragmentB frgamentB = new FrgamentB();
3 fragmentB.setTargetFragment(FrgamentA.this, AppConstant.FRAGMENT_CODE);
4 ft.addToBackStack(fragment.getClass().getName());
5 ft.add(R.id.content, fragment, tag);
6 ft.commit();