fragment/src/main/java/androidx/fragment/app/FragmentTransition.java
static void startTransitions(FragmentManagerImpl fragmentManager,
            ArrayList<BackStackRecord> records, ArrayList<Boolean> isRecordPop,
            int startIndex, int endIndex, boolean isReordered) {
        if (fragmentManager.mCurState < Fragment.CREATED) {
            return;
        }

        SparseArray<FragmentContainerTransition> transitioningFragments =
                new SparseArray<>();
        for (int i = startIndex; i < endIndex; i++) {
            final BackStackRecord record = records.get(i);
            final boolean isPop = isRecordPop.get(i);
            if (isPop) {
                calculatePopFragments(record, transitioningFragments, isReordered);
            } else {
                calculateFragments(record, transitioningFragments, isReordered);
            }
        }

        if (transitioningFragments.size() != 0) {
            final View nonExistentView = new View(fragmentManager.mHost.getContext());
            final int numContainers = transitioningFragments.size();
            for (int i = 0; i < numContainers; i++) {
                int containerId = transitioningFragments.keyAt(i);
                ArrayMap<String, String> nameOverrides = calculateNameOverrides(containerId,
                        records, isRecordPop, startIndex, endIndex);

                FragmentContainerTransition containerTransition =
                        transitioningFragments.valueAt(i);

                if (isReordered) {
                    configureTransitionsReordered(fragmentManager, containerId,
                            containerTransition, nonExistentView, nameOverrides);
                } else {
                    configureTransitionsOrdered(fragmentManager, containerId,
                            containerTransition, nonExistentView, nameOverrides);
                }
            }
        }
    }
/**
     * The main entry point for Fragment Transitions, this starts the transitions
     * set on the leaving Fragment's {@link Fragment#getExitTransition()}, the
     * entering Fragment's {@link Fragment#getEnterTransition()} and
     * {@link Fragment#getSharedElementEnterTransition()}. When popping,
     * the leaving Fragment's {@link Fragment#getReturnTransition()} and
     * {@link Fragment#getSharedElementReturnTransition()} and the entering
     * {@link Fragment#getReenterTransition()} will be run.
     * <p>
     * With reordered Fragment Transitions, all Views have been added to the
     * View hierarchy prior to calling this method. The incoming Fragment's Views
     * will be INVISIBLE. With ordered Fragment Transitions, this method
     * is called before any change has been made to the hierarchy. That means
     * that the added Fragments have not created their Views yet and the hierarchy
     * is unknown.
     *
     * @param fragmentManager The executing FragmentManagerImpl
     * @param records The list of transactions being executed.
     * @param isRecordPop For each transaction, whether it is a pop transaction or not.
     * @param startIndex The first index into records and isRecordPop to execute as
     *                   part of this transition.
     * @param endIndex One past the last index into records and isRecordPop to execute
     *                 as part of this transition.
     * @param isReordered true if this is a reordered transaction, meaning that the
     *                    Views of incoming fragments have been added. false if the
     *                    transaction has yet to be run and Views haven't been created.
     */
The main entry point for Fragment Transitions, this starts the transitions
set on the leaving Fragment's  Fragment#getExitTransition(), the
entering Fragment's  Fragment#getEnterTransition() and
Fragment#getSharedElementEnterTransition(). When popping,
the leaving Fragment's  Fragment#getReturnTransition() and
Fragment#getSharedElementReturnTransition() and the entering
Fragment#getReenterTransition() will be run.

With reordered Fragment Transitions, all Views have been added to the
View hierarchy prior to calling this method. The incoming Fragment's Views
will be INVISIBLE. With ordered Fragment Transitions, this method
is called before any change has been made to the hierarchy. That means
that the added Fragments have not created their Views yet and the hierarchy
is unknown.

@param fragmentManager The executing FragmentManagerImpl
@param records The list of transactions being executed.
@param isRecordPop For each transaction, whether it is a pop transaction or not.
@param startIndex The first index into records and isRecordPop to execute as
part of this transition.
@param endIndex One past the last index into records and isRecordPop to execute
as part of this transition.
@param isReordered true if this is a reordered transaction, meaning that the
Views of incoming fragments have been added. false if the
transaction has yet to be run and Views haven't been created.
The main entry point for Fragment Transitions this starts the transitions set on the leaving Fragment ' s Fragment#getExitTransition () the entering Fragment ' s Fragment#getEnterTransition () and Fragment#getSharedElementEnterTransition () . When popping the leaving Fragment ' s Fragment#getReturnTransition () and Fragment#getSharedElementReturnTransition () and the entering Fragment#getReenterTransition () will be run . With reordered Fragment Transitions all Views have been added to the View hierarchy prior to calling this method . The incoming Fragment ' s Views will be INVISIBLE . With ordered Fragment Transitions this method is called before any change has been made to the hierarchy . That means that the added Fragments have not created their Views yet and the hierarchy is unknown . @param fragmentManager The executing FragmentManagerImpl @param records The list of transactions being executed . @param isRecordPop For each transaction whether it is a pop transaction or not . @param startIndex The first index into records and isRecordPop to execute as part of this transition . @param endIndex One past the last index into records and isRecordPop to execute as part of this transition . @param isReordered true if this is a reordered transaction meaning that the Views of incoming fragments have been added . false if the transaction has yet to be run and Views haven ' t been created .
static void startTransitions(FragmentManagerImpl fragmentManager,
            ArrayList<BackStackRecord> records, ArrayList<Boolean> isRecordPop,
            int startIndex, int endIndex, boolean isReordered) {
        if (fragmentManager.mCurState < Fragment.CREATED) {
            return;
        }
        SparseArray<FragmentContainerTransition> transitioningFragments =
                new SparseArray<>();
        for (int i = startIndex; i < endIndex; i++) {
            final BackStackRecord record = records.get(i);
            final boolean isPop = isRecordPop.get(i);
            if (isPop) {
                calculatePopFragments(record, transitioningFragments, isReordered);
            } else {
                calculateFragments(record, transitioningFragments, isReordered);
            }
        }
        if (transitioningFragments.size() != 0) {
            final View nonExistentView = new View(fragmentManager.mHost.getContext());
            final int numContainers = transitioningFragments.size();
            for (int i = 0; i < numContainers; i++) {
                int containerId = transitioningFragments.keyAt(i);
                ArrayMap<String, String> nameOverrides = calculateNameOverrides(containerId,
                        records, isRecordPop, startIndex, endIndex);
                FragmentContainerTransition containerTransition =
                        transitioningFragments.valueAt(i);
                if (isReordered) {
                    configureTransitionsReordered(fragmentManager, containerId,
                            containerTransition, nonExistentView, nameOverrides);
                } else {
                    configureTransitionsOrdered(fragmentManager, containerId,
                            containerTransition, nonExistentView, nameOverrides);
                }
            }
        }
    }
static void startTransitions ( FragmentManagerImpl fragmentManager , ArrayList < BackStackRecord > records , ArrayList < Boolean > isRecordPop , int startIndex , int endIndex , boolean isReordered ) { if ( fragmentManager . mCurState < Fragment . CREATED ) { return ; } SparseArray < FragmentContainerTransition > transitioningFragments = new SparseArray < > ( ) ; for ( int i = startIndex ; i < endIndex ; i ++ ) { final BackStackRecord record = records . get ( i ) ; final boolean isPop = isRecordPop . get ( i ) ; if ( isPop ) { calculatePopFragments ( record , transitioningFragments , isReordered ) ; } else { calculateFragments ( record , transitioningFragments , isReordered ) ; } } if ( transitioningFragments . size ( ) != 0 ) { final View nonExistentView = new View ( fragmentManager . mHost . getContext ( ) ) ; final int numContainers = transitioningFragments . size ( ) ; for ( int i = 0 ; i < numContainers ; i ++ ) { int containerId = transitioningFragments . keyAt ( i ) ; ArrayMap < String , String > nameOverrides = calculateNameOverrides ( containerId , records , isRecordPop , startIndex , endIndex ) ; FragmentContainerTransition containerTransition = transitioningFragments . valueAt ( i ) ; if ( isReordered ) { configureTransitionsReordered ( fragmentManager , containerId , containerTransition , nonExistentView , nameOverrides ) ; } else { configureTransitionsOrdered ( fragmentManager , containerId , containerTransition , nonExistentView , nameOverrides ) ; } } } }
The main entry point for Fragment Transitions, this starts the transitions
 set on the leaving Fragment's {@link Fragment#getExitTransition()}, the
 entering Fragment's {@link Fragment#getEnterTransition()} and
 {@link Fragment#getSharedElementEnterTransition()}.
The main entry point for Fragment Transitions this starts the transitions set on the leaving Fragment ' s { @link Fragment#getExitTransition () } the entering Fragment ' s { @link Fragment#getEnterTransition () } and { @link Fragment#getSharedElementEnterTransition () } .