File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
android/src/main/java/com/reactnativenavigation/viewcontrollers/viewcontroller Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,10 @@ class LayoutDirectionApplier {
1010 val currentContext = root.view?.context ? : return
1111
1212 if (options.layout.direction.hasValue()) {
13- root.activity.window.decorView.layoutDirection = options.layout.direction.get()
13+ val direction = options.layout.direction.get()
14+ root.activity?.window?.decorView?.let { decor ->
15+ decor.layoutDirection = direction
16+ }
1417 I18nUtil .instance.allowRTL(currentContext, options.layout.direction.isRtl)
1518 I18nUtil .instance.forceRTL(currentContext, options.layout.direction.isRtl)
1619 }
Original file line number Diff line number Diff line change @@ -137,6 +137,7 @@ private void applyNavigationBarVisibility(NavigationBarOptions options) {
137137 }
138138
139139 private void setNavigationBarBackgroundColor (NavigationBarOptions navigationBar ) {
140+ if (activity == null ) return ;
140141 int defaultColor = SystemUiUtils .getDefaultNavBarColor ();
141142 if (navigationBar .backgroundColor .canApplyValue ()) {
142143 int color = navigationBar .backgroundColor .get (defaultColor );
You can’t perform that action at this time.
0 commit comments