fragment/src/main/java/androidx/fragment/app/FragmentTransition.java
private static void scheduleTargetChange(final FragmentTransitionImpl impl,
            final ViewGroup sceneRoot,
            final Fragment inFragment, final View nonExistentView,
            final ArrayList<View> sharedElementsIn,
            final Object enterTransition, final ArrayList<View> enteringViews,
            final Object exitTransition, final ArrayList<View> exitingViews) {
        OneShotPreDrawListener.add(sceneRoot, new Runnable() {
            @Override
            public void run() {
                if (enterTransition != null) {
                    impl.removeTarget(enterTransition,
                            nonExistentView);
                    ArrayList<View> views = configureEnteringExitingViews(impl,
                            enterTransition, inFragment, sharedElementsIn, nonExistentView);
                    enteringViews.addAll(views);
                }

                if (exitingViews != null) {
                    if (exitTransition != null) {
                        ArrayList<View> tempExiting = new ArrayList<>();
                        tempExiting.add(nonExistentView);
                        impl.replaceTargets(exitTransition, exitingViews,
                                tempExiting);
                    }
                    exitingViews.clear();
                    exitingViews.add(nonExistentView);
                }
            }
        });
    }
/**
     * This method is used for fragment transitions for ordrered transactions to change the
     * enter and exit transition targets after the call to
     * {@link FragmentTransitionCompat21#beginDelayedTransition(ViewGroup, Object)}. The exit
     * transition must ensure that it does not target any Views and the enter transition must start
     * targeting the Views of the incoming Fragment.
     *
     * @param sceneRoot The fragment container View
     * @param inFragment The last fragment that is entering
     * @param nonExistentView A view that does not exist in the hierarchy that is used as a
     *                        transition target to ensure no View is targeted.
     * @param sharedElementsIn The shared element Views of the incoming fragment
     * @param enterTransition The enter transition of the incoming fragment
     * @param enteringViews The entering Views of the incoming fragment
     * @param exitTransition The exit transition of the outgoing fragment
     * @param exitingViews The exiting views of the outgoing fragment
     */
This method is used for fragment transitions for ordrered transactions to change the
enter and exit transition targets after the call to
FragmentTransitionCompat21#beginDelayedTransition(ViewGroup, Object). The exit
transition must ensure that it does not target any Views and the enter transition must start
targeting the Views of the incoming Fragment.

@param sceneRoot The fragment container View
@param inFragment The last fragment that is entering
@param nonExistentView A view that does not exist in the hierarchy that is used as a
transition target to ensure no View is targeted.
This method is used for fragment transitions for ordrered transactions to change the enter and exit transition targets after the call to FragmentTransitionCompat21#beginDelayedTransition ( ViewGroup Object ) . The exit transition must ensure that it does not target any Views and the enter transition must start targeting the Views of the incoming Fragment . @param sceneRoot The fragment container View @param inFragment The last fragment that is entering @param nonExistentView A view that does not exist in the hierarchy that is used as a transition target to ensure no View is targeted .
private static void scheduleTargetChange(final FragmentTransitionImpl impl,
            final ViewGroup sceneRoot,
            final Fragment inFragment, final View nonExistentView,
            final ArrayList<View> sharedElementsIn,
            final Object enterTransition, final ArrayList<View> enteringViews,
            final Object exitTransition, final ArrayList<View> exitingViews) {
        OneShotPreDrawListener.add(sceneRoot, new Runnable() {
            @Override
            public void run() {
                if (enterTransition != null) {
                    impl.removeTarget(enterTransition,
                            nonExistentView);
                    ArrayList<View> views = configureEnteringExitingViews(impl,
                            enterTransition, inFragment, sharedElementsIn, nonExistentView);
                    enteringViews.addAll(views);
                }
                if (exitingViews != null) {
                    if (exitTransition != null) {
                        ArrayList<View> tempExiting = new ArrayList<>();
                        tempExiting.add(nonExistentView);
                        impl.replaceTargets(exitTransition, exitingViews,
                                tempExiting);
                    }
                    exitingViews.clear();
                    exitingViews.add(nonExistentView);
                }
            }
        });
    }
private static void scheduleTargetChange ( final FragmentTransitionImpl impl , final ViewGroup sceneRoot , final Fragment inFragment , final View nonExistentView , final ArrayList < View > sharedElementsIn , final Object enterTransition , final ArrayList < View > enteringViews , final Object exitTransition , final ArrayList < View > exitingViews ) { OneShotPreDrawListener . add ( sceneRoot , new Runnable ( ) { @ Override public void run ( ) { if ( enterTransition != null ) { impl . removeTarget ( enterTransition , nonExistentView ) ; ArrayList < View > views = configureEnteringExitingViews ( impl , enterTransition , inFragment , sharedElementsIn , nonExistentView ) ; enteringViews . addAll ( views ) ; } if ( exitingViews != null ) { if ( exitTransition != null ) { ArrayList < View > tempExiting = new ArrayList < > ( ) ; tempExiting . add ( nonExistentView ) ; impl . replaceTargets ( exitTransition , exitingViews , tempExiting ) ; } exitingViews . clear ( ) ; exitingViews . add ( nonExistentView ) ; } } } ) ; }
This method is used for fragment transitions for ordrered transactions to change the
 enter and exit transition targets after the call to
 {@link FragmentTransitionCompat21#beginDelayedTransition(ViewGroup, Object)}.
This method is used for fragment transitions for ordrered transactions to change the enter and exit transition targets after the call to { @link FragmentTransitionCompat21#beginDelayedTransition ( ViewGroup Object ) } .