fragment/src/main/java/androidx/fragment/app/FragmentTransition.java
private static Object mergeTransitions(FragmentTransitionImpl impl, Object enterTransition,
            Object exitTransition, Object sharedElementTransition, Fragment inFragment,
            boolean isPop) {
        boolean overlap = true;
        if (enterTransition != null && exitTransition != null && inFragment != null) {
            overlap = isPop ? inFragment.getAllowReturnTransitionOverlap() :
                    inFragment.getAllowEnterTransitionOverlap();
        }

        // Wrap the transitions. Explicit targets like in enter and exit will cause the
        // views to be targeted regardless of excluded views. If that happens, then the
        // excluded fragments views (hidden fragments) will still be in the transition.

        Object transition;
        if (overlap) {
            // Regular transition -- do it all together
            transition = impl.mergeTransitionsTogether(exitTransition,
                    enterTransition, sharedElementTransition);
        } else {
            // First do exit, then enter, but allow shared element transition to happen
            // during both.
            transition = impl.mergeTransitionsInSequence(exitTransition,
                    enterTransition, sharedElementTransition);
        }
        return transition;
    }
/**
     * Merges exit, shared element, and enter transitions so that they act together or
     * sequentially as defined in the fragments.
     */
Merges exit, shared element, and enter transitions so that they act together or
sequentially as defined in the fragments.
Merges exit shared element and enter transitions so that they act together or sequentially as defined in the fragments .
private static Object mergeTransitions(FragmentTransitionImpl impl, Object enterTransition,
            Object exitTransition, Object sharedElementTransition, Fragment inFragment,
            boolean isPop) {
        boolean overlap = true;
        if (enterTransition != null && exitTransition != null && inFragment != null) {
            overlap = isPop ? inFragment.getAllowReturnTransitionOverlap() :
                    inFragment.getAllowEnterTransitionOverlap();
        }
        Object transition;
        if (overlap) {
            transition = impl.mergeTransitionsTogether(exitTransition,
                    enterTransition, sharedElementTransition);
        } else {
            transition = impl.mergeTransitionsInSequence(exitTransition,
                    enterTransition, sharedElementTransition);
        }
        return transition;
    }
private static Object mergeTransitions ( FragmentTransitionImpl impl , Object enterTransition , Object exitTransition , Object sharedElementTransition , Fragment inFragment , boolean isPop ) { boolean overlap = true ; if ( enterTransition != null && exitTransition != null && inFragment != null ) { overlap = isPop ? inFragment . getAllowReturnTransitionOverlap ( ) : inFragment . getAllowEnterTransitionOverlap ( ) ; } Object transition ; if ( overlap ) { transition = impl . mergeTransitionsTogether ( exitTransition , enterTransition , sharedElementTransition ) ; } else { transition = impl . mergeTransitionsInSequence ( exitTransition , enterTransition , sharedElementTransition ) ; } return transition ; }
Merges exit, shared element, and enter transitions so that they act together or
 sequentially as defined in the fragments.
Merges exit shared element and enter transitions so that they act together or sequentially as defined in the fragments .
// Wrap the transitions. Explicit targets like in enter and exit will cause the // views to be targeted regardless of excluded views. If that happens, then the // excluded fragments views (hidden fragments) will still be in the transition. // Regular transition -- do it all together // First do exit, then enter, but allow shared element transition to happen // during both.