fragment/src/main/java/androidx/fragment/app/FragmentTransitionImpl.java
protected static void bfsAddViewChildren(final List<View> views, final View startView) {
        final int startIndex = views.size();
        if (containedBeforeIndex(views, startView, startIndex)) {
            return; // This child is already in the list, so all its children are also.
        }
        views.add(startView);
        for (int index = startIndex; index < views.size(); index++) {
            final View view = views.get(index);
            if (view instanceof ViewGroup) {
                ViewGroup viewGroup = (ViewGroup) view;
                final int childCount =  viewGroup.getChildCount();
                for (int childIndex = 0; childIndex < childCount; childIndex++) {
                    final View child = viewGroup.getChildAt(childIndex);
                    if (!containedBeforeIndex(views, child, startIndex)) {
                        views.add(child);
                    }
                }
            }
        }
    }
/**
     * Uses a breadth-first scheme to add startView and all of its children to views.
     * It won't add a child if it is already in views.
     */
Uses a breadth-first scheme to add startView and all of its children to views.
It won't add a child if it is already in views.
Uses a breadth - first scheme to add startView and all of its children to views . It won ' t add a child if it is already in views .
protected static void bfsAddViewChildren(final List<View> views, final View startView) {
        final int startIndex = views.size();
        if (containedBeforeIndex(views, startView, startIndex)) {
            return; 
        }
        views.add(startView);
        for (int index = startIndex; index < views.size(); index++) {
            final View view = views.get(index);
            if (view instanceof ViewGroup) {
                ViewGroup viewGroup = (ViewGroup) view;
                final int childCount =  viewGroup.getChildCount();
                for (int childIndex = 0; childIndex < childCount; childIndex++) {
                    final View child = viewGroup.getChildAt(childIndex);
                    if (!containedBeforeIndex(views, child, startIndex)) {
                        views.add(child);
                    }
                }
            }
        }
    }
protected static void bfsAddViewChildren ( final List < View > views , final View startView ) { final int startIndex = views . size ( ) ; if ( containedBeforeIndex ( views , startView , startIndex ) ) { return ; } views . add ( startView ) ; for ( int index = startIndex ; index < views . size ( ) ; index ++ ) { final View view = views . get ( index ) ; if ( view instanceof ViewGroup ) { ViewGroup viewGroup = ( ViewGroup ) view ; final int childCount = viewGroup . getChildCount ( ) ; for ( int childIndex = 0 ; childIndex < childCount ; childIndex ++ ) { final View child = viewGroup . getChildAt ( childIndex ) ; if ( ! containedBeforeIndex ( views , child , startIndex ) ) { views . add ( child ) ; } } } } }
Uses a breadth-first scheme to add startView and all of its children to views.
Uses a breadth - first scheme to add startView and all of its children to views .
// This child is already in the list, so all its children are also.