fragment/src/androidTest/java/androidx/fragment/app/FragmentAnimatorTest.java
@RequiresApi(Build.VERSION_CODES.JELLY_BEAN)
    @Test
    public void postponedRemoveAnimators() throws Throwable {
        final FragmentManager fm = mActivityRule.getActivity().getSupportFragmentManager();

        final AnimatorFragment fragment = new AnimatorFragment();
        fm.beginTransaction()
                .add(R.id.fragmentContainer, fragment, "1")
                .setReorderingAllowed(true)
                .commit();
        FragmentTestUtil.waitForExecution(mActivityRule);

        fm.beginTransaction()
                .setCustomAnimations(ENTER, EXIT, POP_ENTER, POP_EXIT)
                .remove(fragment)
                .addToBackStack(null)
                .setReorderingAllowed(true)
                .commit();
        FragmentTestUtil.waitForExecution(mActivityRule);

        assertExitPostponedPopEnter(fragment);
    }
// but the animators are delayed when an entering Fragment is postponed.
but the animators are delayed when an entering Fragment is postponed.
but the animators are delayed when an entering Fragment is postponed .
@RequiresApi(Build.VERSION_CODES.JELLY_BEAN)
    @Test
    public void postponedRemoveAnimators() throws Throwable {
        final FragmentManager fm = mActivityRule.getActivity().getSupportFragmentManager();
        final AnimatorFragment fragment = new AnimatorFragment();
        fm.beginTransaction()
                .add(R.id.fragmentContainer, fragment, "1")
                .setReorderingAllowed(true)
                .commit();
        FragmentTestUtil.waitForExecution(mActivityRule);
        fm.beginTransaction()
                .setCustomAnimations(ENTER, EXIT, POP_ENTER, POP_EXIT)
                .remove(fragment)
                .addToBackStack(null)
                .setReorderingAllowed(true)
                .commit();
        FragmentTestUtil.waitForExecution(mActivityRule);
        assertExitPostponedPopEnter(fragment);
    }
@ RequiresApi ( Build . VERSION_CODES . JELLY_BEAN ) @ Test public void postponedRemoveAnimators ( ) throws Throwable { final FragmentManager fm = mActivityRule . getActivity ( ) . getSupportFragmentManager ( ) ; final AnimatorFragment fragment = new AnimatorFragment ( ) ; fm . beginTransaction ( ) . add ( R . id . fragmentContainer , fragment , "1" ) . setReorderingAllowed ( true ) . commit ( ) ; FragmentTestUtil . waitForExecution ( mActivityRule ) ; fm . beginTransaction ( ) . setCustomAnimations ( ENTER , EXIT , POP_ENTER , POP_EXIT ) . remove ( fragment ) . addToBackStack ( null ) . setReorderingAllowed ( true ) . commit ( ) ; FragmentTestUtil . waitForExecution ( mActivityRule ) ; assertExitPostponedPopEnter ( fragment ) ; }
but the animators are delayed when an entering Fragment is postponed.
but the animators are delayed when an entering Fragment is postponed .