package com.bottomsheetbehavior;

import android.support.design.widget.CoordinatorLayout;
import android.view.View;

import com.facebook.react.uimanager.ViewGroupManager;
import com.facebook.react.uimanager.annotations.ReactProp;
import com.facebook.react.uimanager.ThemedReactContext;

public class CoordinatorLayoutManager extends ViewGroupManager<CoordinatorLayoutView> {

    private final static String REACT_CLASS = "RCTCoordinatorLayoutAndroid";

    @Override
    public String getName() {
        return REACT_CLASS;
    }

    @Override
    public CoordinatorLayoutView createViewInstance(ThemedReactContext context) {
        return new CoordinatorLayoutView(context);
    }

    @Override
    public void addView(CoordinatorLayoutView parent, View child, int index) {
        super.addView(parent, child, index);

        // Sets FloatingActionButton anchor automatically
        if (child instanceof FloatingActionButtonView) {
            boolean autoAnchor = ((FloatingActionButtonView) child).getAutoAnchor();
            for (int i = 0; i < parent.getChildCount(); i++) {
                View childView = parent.getChildAt(i);
                if (childView instanceof BottomSheetBehaviorView && autoAnchor) {
                    int bottomSheetId = childView.getId();
                    ((CoordinatorLayout.LayoutParams) child.getLayoutParams()).setAnchorId(bottomSheetId);
                }
            }
        }
    }

    @Override
    public boolean needsCustomLayoutForChildren() {
        return true;
    }
}

@@ -950,29 +950,12 @@
     
-boolean autoAnchor = 
+if (
 ((Fl
@@ -1000,18 +1000,24 @@
 Anchor()
-;%0A
+) %7B%0A    
         
@@ -1087,16 +1087,20 @@
         
+ 
+   
 View chi
@@ -1130,16 +1130,20 @@
 dAt(i);%0A
+    
         
@@ -1202,26 +1202,16 @@
 View
- && autoAnchor
 ) %7B%0A
+    
     
@@ -1265,16 +1265,20 @@
 etId();%0A
+    
         
@@ -1376,16 +1376,38 @@
 eetId);%0A
+                    %7D%0A
         

Check autoAnchor before child iteration