소스 검색

Set activity layout color from appStyle (#482)

closes #464
Guy Carmeli 8 년 전
부모
커밋
ca512832d6
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 4
    0
      android/app/src/main/java/com/reactnativenavigation/controllers/NavigationActivity.java

+ 4
- 0
android/app/src/main/java/com/reactnativenavigation/controllers/NavigationActivity.java 파일 보기

@@ -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