Answers for "fragment to fragment"

0

fragment to fragment

public void onClick2(View view) {
    Fragment2 fragment2 = new Fragment2();
    FragmentManager fragmentManager = getFragmentManager();
    FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
    fragmentTransaction.replace(R.id.fragment1, fragment2);
    fragmentTransaction.commit();
}
Posted by: Guest on February-18-2021

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language