Browse Source

Set activity layout color from appStyle (#482)

closes #464
Guy Carmeli 8 years ago
parent
commit
ca512832d6

+ 4
- 0
android/app/src/main/java/com/reactnativenavigation/controllers/NavigationActivity.java View File

17
 import com.reactnativenavigation.layouts.Layout;
17
 import com.reactnativenavigation.layouts.Layout;
18
 import com.reactnativenavigation.layouts.LayoutFactory;
18
 import com.reactnativenavigation.layouts.LayoutFactory;
19
 import com.reactnativenavigation.params.ActivityParams;
19
 import com.reactnativenavigation.params.ActivityParams;
20
+import com.reactnativenavigation.params.AppStyle;
20
 import com.reactnativenavigation.params.ContextualMenuParams;
21
 import com.reactnativenavigation.params.ContextualMenuParams;
21
 import com.reactnativenavigation.params.ScreenParams;
22
 import com.reactnativenavigation.params.ScreenParams;
22
 import com.reactnativenavigation.params.SnackbarParams;
23
 import com.reactnativenavigation.params.SnackbarParams;
71
 
72
 
72
     private void createLayout() {
73
     private void createLayout() {
73
         layout = LayoutFactory.create(this, activityParams);
74
         layout = LayoutFactory.create(this, activityParams);
75
+        if (AppStyle.appStyle.screenBackgroundColor.hasColor()) {
76
+            layout.asView().setBackgroundColor(AppStyle.appStyle.screenBackgroundColor.getColor());
77
+        }
74
         setContentView(layout.asView());
78
         setContentView(layout.asView());
75
     }
79
     }
76
 
80