fragment/src/main/java/androidx/fragment/app/FragmentTransition.java
private static void addSharedElementsWithMatchingNames(ArrayList<View> views,
            ArrayMap<String, View> sharedElements, Collection<String> nameOverridesSet) {
        for (int i = sharedElements.size() - 1; i >= 0; i--) {
            View view = sharedElements.valueAt(i);
            if (nameOverridesSet.contains(ViewCompat.getTransitionName(view))) {
                views.add(view);
            }
        }
    }
/**
     * Add Views from sharedElements into views that have the transitionName in the
     * nameOverridesSet.
     *
     * @param views               Views list to add shared elements to
     * @param sharedElements      List of shared elements
     * @param nameOverridesSet    The transition names for all views to be copied from
     *                            sharedElements to views.
     */
Add Views from sharedElements into views that have the transitionName in the
nameOverridesSet.

@param views               Views list to add shared elements to
@param sharedElements      List of shared elements
@param nameOverridesSet    The transition names for all views to be copied from
sharedElements to views.
Add Views from sharedElements into views that have the transitionName in the nameOverridesSet . @param views Views list to add shared elements to @param sharedElements List of shared elements @param nameOverridesSet The transition names for all views to be copied from sharedElements to views .
private static void addSharedElementsWithMatchingNames(ArrayList<View> views,
            ArrayMap<String, View> sharedElements, Collection<String> nameOverridesSet) {
        for (int i = sharedElements.size() - 1; i >= 0; i--) {
            View view = sharedElements.valueAt(i);
            if (nameOverridesSet.contains(ViewCompat.getTransitionName(view))) {
                views.add(view);
            }
        }
    }
private static void addSharedElementsWithMatchingNames ( ArrayList < View > views , ArrayMap < String , View > sharedElements , Collection < String > nameOverridesSet ) { for ( int i = sharedElements . size ( ) - 1 ; i >= 0 ; i -- ) { View view = sharedElements . valueAt ( i ) ; if ( nameOverridesSet . contains ( ViewCompat . getTransitionName ( view ) ) ) { views . add ( view ) ; } } }
Add Views from sharedElements into views that have the transitionName in the
 nameOverridesSet.
Add Views from sharedElements into views that have the transitionName in the nameOverridesSet .