| 
				
			 | 
			
			
				@@ -1,6 +1,7 @@ 
			 | 
		
	
		
			
			| 
				1
			 | 
			
				1
			 | 
			
			
				 package com.reactnativenavigation.presentation; 
			 | 
		
	
		
			
			| 
				2
			 | 
			
				2
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				3
			 | 
			
				3
			 | 
			
			
				 import android.graphics.Color; 
			 | 
		
	
		
			
			| 
				
			 | 
			
				4
			 | 
			
			
				+import android.support.annotation.IntRange; 
			 | 
		
	
		
			
			| 
				4
			 | 
			
				5
			 | 
			
			
				 import android.view.ViewGroup; 
			 | 
		
	
		
			
			| 
				5
			 | 
			
				6
			 | 
			
			
				 import android.view.ViewGroup.MarginLayoutParams; 
			 | 
		
	
		
			
			| 
				6
			 | 
			
				7
			 | 
			
			
				  
			 | 
		
	
	
		
			
			| 
				
			 | 
			
			
				@@ -53,16 +54,18 @@ public class BottomTabsOptionsPresenter { 
			 | 
		
	
		
			
			| 
				53
			 | 
			
				54
			 | 
			
			
				     } 
			 | 
		
	
		
			
			| 
				54
			 | 
			
				55
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				55
			 | 
			
				56
			 | 
			
			
				     public void applyChildOptions(Options options, Component child) { 
			 | 
		
	
		
			
			| 
				56
			 | 
			
				
			 | 
			
			
				-        Options withDefaultOptions = options.copy().withDefaultOptions(defaultOptions); 
			 | 
		
	
		
			
			| 
				57
			 | 
			
				
			 | 
			
			
				-        applyBottomTabsOptions(withDefaultOptions.bottomTabsOptions, withDefaultOptions.animations); 
			 | 
		
	
		
			
			| 
				58
			 | 
			
				57
			 | 
			
			
				         int tabIndex = bottomTabFinder.findByComponent(child); 
			 | 
		
	
		
			
			| 
				59
			 | 
			
				
			 | 
			
			
				-        applyDrawBehind(withDefaultOptions.bottomTabsOptions, tabIndex); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				58
			 | 
			
			
				+        if (tabIndex >= 0) { 
			 | 
		
	
		
			
			| 
				
			 | 
			
				59
			 | 
			
			
				+            Options withDefaultOptions = options.copy().withDefaultOptions(defaultOptions); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				60
			 | 
			
			
				+            applyBottomTabsOptions(withDefaultOptions.bottomTabsOptions, withDefaultOptions.animations); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				61
			 | 
			
			
				+            applyDrawBehind(withDefaultOptions.bottomTabsOptions, tabIndex); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				62
			 | 
			
			
				+        } 
			 | 
		
	
		
			
			| 
				60
			 | 
			
				63
			 | 
			
			
				     } 
			 | 
		
	
		
			
			| 
				61
			 | 
			
				64
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				62
			 | 
			
				65
			 | 
			
			
				     public void mergeChildOptions(Options options, Component child) { 
			 | 
		
	
		
			
			| 
				63
			 | 
			
				66
			 | 
			
			
				         mergeBottomTabsOptions(options.bottomTabsOptions, options.animations); 
			 | 
		
	
		
			
			| 
				64
			 | 
			
				67
			 | 
			
			
				         int tabIndex = bottomTabFinder.findByComponent(child); 
			 | 
		
	
		
			
			| 
				65
			 | 
			
				
			 | 
			
			
				-        mergeDrawBehind(options.bottomTabsOptions, tabIndex); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				68
			 | 
			
			
				+        if (tabIndex >= 0) mergeDrawBehind(options.bottomTabsOptions, tabIndex); 
			 | 
		
	
		
			
			| 
				66
			 | 
			
				69
			 | 
			
			
				     } 
			 | 
		
	
		
			
			| 
				67
			 | 
			
				70
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				68
			 | 
			
				71
			 | 
			
			
				     private void mergeBottomTabsOptions(BottomTabsOptions options, AnimationsOptions animations) { 
			 | 
		
	
	
		
			
			| 
				
			 | 
			
			
				@@ -99,7 +102,7 @@ public class BottomTabsOptionsPresenter { 
			 | 
		
	
		
			
			| 
				99
			 | 
			
				102
			 | 
			
			
				         } 
			 | 
		
	
		
			
			| 
				100
			 | 
			
				103
			 | 
			
			
				     } 
			 | 
		
	
		
			
			| 
				101
			 | 
			
				104
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				102
			 | 
			
				
			 | 
			
			
				-    private void applyDrawBehind(BottomTabsOptions options, int tabIndex) { 
			 | 
		
	
		
			
			| 
				
			 | 
			
				105
			 | 
			
			
				+    private void applyDrawBehind(BottomTabsOptions options, @IntRange(from = 0) int tabIndex) { 
			 | 
		
	
		
			
			| 
				103
			 | 
			
				106
			 | 
			
			
				         ViewGroup tab = tabs.get(tabIndex).getView(); 
			 | 
		
	
		
			
			| 
				104
			 | 
			
				107
			 | 
			
			
				         MarginLayoutParams lp = (MarginLayoutParams) tab.getLayoutParams(); 
			 | 
		
	
		
			
			| 
				105
			 | 
			
				108
			 | 
			
			
				         if (options.drawBehind.isTrue()) { 
			 |