Parcourir la source

Set activity layout color from appStyle (#482)

closes #464
Guy Carmeli il y a 8 ans
Parent
révision
ca512832d6

+ 4
- 0
android/app/src/main/java/com/reactnativenavigation/controllers/NavigationActivity.java Voir le fichier

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