Browse Source

Set BottomTabs color and

Guy Carmeli 8 years ago
parent
commit
22bba3c6a2

+ 4
- 0
android/app/src/main/java/com/reactnativenavigation/params/parsers/ScreenStyleParamsParser.java View File

22
         result.bottomTabsHidden = params.getBoolean("bottomTabsHidden");
22
         result.bottomTabsHidden = params.getBoolean("bottomTabsHidden");
23
         result.bottomTabsHiddenOnScroll = params.getBoolean("bottomTabsHiddenOnScroll");
23
         result.bottomTabsHiddenOnScroll = params.getBoolean("bottomTabsHiddenOnScroll");
24
         result.bottomTabsColor = new ScreenStyleParams.Color(ColorParser.parse(params.getString("bottomTabsColor")));
24
         result.bottomTabsColor = new ScreenStyleParams.Color(ColorParser.parse(params.getString("bottomTabsColor")));
25
+        result.bottomTabsButtonColor =
26
+                new ScreenStyleParams.Color(ColorParser.parse(params.getString("bottomTabsButtonColor")));
27
+        result.selectedBottomTabsButtonColor =
28
+                new ScreenStyleParams.Color(ColorParser.parse(params.getString("selectedBottomTabsButtonColor")));
25
         result.drawUnderTopBar = params.getBoolean("drawUnderTopBar", false);
29
         result.drawUnderTopBar = params.getBoolean("drawUnderTopBar", false);
26
         return result;
30
         return result;
27
     }
31
     }

+ 6
- 3
android/app/src/main/java/com/reactnativenavigation/views/BottomTabs.java View File

27
 
27
 
28
     public void setStyleFromScreen(ScreenStyleParams params) {
28
     public void setStyleFromScreen(ScreenStyleParams params) {
29
         setBackgroundColor(params.bottomTabsColor);
29
         setBackgroundColor(params.bottomTabsColor);
30
+        if (params.bottomTabsButtonColor.hasColor()) {
31
+            setInactiveColor(params.bottomTabsButtonColor.getColor());
32
+        }
30
 
33
 
31
-        //        setForceTitlesDisplay(true);
32
-//        setInactiveColor(params.bottomTabsButtonColor.getColor());
33
-//        setAccentColor(params.selectedBottomTabsButtonColor.getColor());
34
+        if (params.selectedBottomTabsButtonColor.hasColor()) {
35
+            setAccentColor(params.selectedBottomTabsButtonColor.getColor());
36
+        }
34
     }
37
     }
35
 
38
 
36
     private void setBackgroundColor(ScreenStyleParams.Color bottomTabsColor) {
39
     private void setBackgroundColor(ScreenStyleParams.Color bottomTabsColor) {