Answers for "popbackstack fragment how to pass value in bundle"

0

popbackstack fragment how to pass value in bundle

FragmentManager fm = getActivity().getFragmentManager();
Bundle arguments = new Bundle();
arguments.putInt("VALUE1", 0);
arguments.putInt("VALUE2", 100);

MyFragment myFragment = new Fragment();
fragment.setArguments(arguments);

fm.beginTransaction().replace(R.id.content_frame, myFragment).commit();
Posted by: Guest on February-19-2021
0

popbackstack fragment how to pass value in bundle

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();
Posted by: Guest on February-19-2021

Code answers related to "popbackstack fragment how to pass value in bundle"

Browse Popular Code Answers by Language