Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

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();
}
 
PREVIOUS NEXT
Tagged: #fragment #fragment
ADD COMMENT
Topic
Name
5+2 =