fragment/src/androidTest/java/androidx/fragment/app/FragmentTransitionTest.java
@Test
    public void intermediateFragment() throws Throwable {
        TransitionFragment fragment1 = setupInitialFragment();

        final TransitionFragment fragment2 = new TransitionFragment();
        fragment2.setLayoutId(R.layout.scene3);

        verifyTransition(fragment1, fragment2, "shared");

        final TransitionFragment fragment3 = new TransitionFragment();
        fragment3.setLayoutId(R.layout.scene2);

        verifyTransition(fragment2, fragment3, "blueSquare");

        // Should transfer backwards when popping multiple:
        verifyPopTransition(2, fragment3, fragment1, fragment2);
    }
// Test that shared element transitions through multiple fragments work together
Test that shared element transitions through multiple fragments work together
Test that shared element transitions through multiple fragments work together
@Test
    public void intermediateFragment() throws Throwable {
        TransitionFragment fragment1 = setupInitialFragment();
        final TransitionFragment fragment2 = new TransitionFragment();
        fragment2.setLayoutId(R.layout.scene3);
        verifyTransition(fragment1, fragment2, "shared");
        final TransitionFragment fragment3 = new TransitionFragment();
        fragment3.setLayoutId(R.layout.scene2);
        verifyTransition(fragment2, fragment3, "blueSquare");
        verifyPopTransition(2, fragment3, fragment1, fragment2);
    }
@ Test public void intermediateFragment ( ) throws Throwable { TransitionFragment fragment1 = setupInitialFragment ( ) ; final TransitionFragment fragment2 = new TransitionFragment ( ) ; fragment2 . setLayoutId ( R . layout . scene3 ) ; verifyTransition ( fragment1 , fragment2 , "shared" ) ; final TransitionFragment fragment3 = new TransitionFragment ( ) ; fragment3 . setLayoutId ( R . layout . scene2 ) ; verifyTransition ( fragment2 , fragment3 , "blueSquare" ) ; verifyPopTransition ( 2 , fragment3 , fragment1 , fragment2 ) ; }
Test that shared element transitions through multiple fragments work together
Test that shared element transitions through multiple fragments work together
// Should transfer backwards when popping multiple: