|  | @@ -1,12 +1,24 @@
 | 
	
		
			
			| 1 | 1 |  package com.reactnativenavigation.viewcontrollers;
 | 
	
		
			
			| 2 | 2 |  
 | 
	
		
			
			|  | 3 | +import android.support.annotation.NonNull;
 | 
	
		
			
			| 3 | 4 |  import android.view.View;
 | 
	
		
			
			| 4 | 5 |  import android.view.ViewGroup;
 | 
	
		
			
			| 5 | 6 |  
 | 
	
		
			
			|  | 7 | +import com.facebook.react.views.view.ReactViewBackgroundDrawable;
 | 
	
		
			
			|  | 8 | +import com.reactnativenavigation.utils.ViewUtils;
 | 
	
		
			
			|  | 9 | +
 | 
	
		
			
			| 6 | 10 |  class YellowBoxHelper {
 | 
	
		
			
			|  | 11 | +    private final static int YELLOW_BOX_COLOR = -218449360;
 | 
	
		
			
			|  | 12 | +
 | 
	
		
			
			| 7 | 13 |      boolean isYellowBox(View parent, View child) {
 | 
	
		
			
			| 8 | 14 |          return parent instanceof ViewGroup &&
 | 
	
		
			
			| 9 | 15 |                 child instanceof ViewGroup &&
 | 
	
		
			
			| 10 |  | -               ((ViewGroup) parent).getChildCount() > 1;
 | 
	
		
			
			|  | 16 | +               ((ViewGroup) parent).getChildCount() > 1 &&
 | 
	
		
			
			|  | 17 | +               !ViewUtils.findChildrenByClassRecursive((ViewGroup) child, View.class, YellowBackgroundMather((ViewGroup) child)).isEmpty();
 | 
	
		
			
			|  | 18 | +    }
 | 
	
		
			
			|  | 19 | +
 | 
	
		
			
			|  | 20 | +    @NonNull
 | 
	
		
			
			|  | 21 | +    private static ViewUtils.Matcher<View> YellowBackgroundMather(ViewGroup vg) {
 | 
	
		
			
			|  | 22 | +        return child1 -> child1.getBackground() instanceof ReactViewBackgroundDrawable && ((ReactViewBackgroundDrawable) child1.getBackground()).getColor() == YELLOW_BOX_COLOR;
 | 
	
		
			
			| 11 | 23 |      }
 | 
	
		
			
			| 12 | 24 |  }
 |