Browse Source

Update screen style on configuration change (#1431)

Brendon Sled 7 years ago
parent
commit
5acce30ace

+ 7
- 0
android/app/src/main/java/com/reactnativenavigation/screens/Screen.java View File

2
 
2
 
3
 import android.annotation.TargetApi;
3
 import android.annotation.TargetApi;
4
 import android.app.Activity;
4
 import android.app.Activity;
5
+import android.content.res.Configuration;
5
 import android.graphics.Color;
6
 import android.graphics.Color;
6
 import android.os.Build;
7
 import android.os.Build;
7
 import android.os.Bundle;
8
 import android.os.Bundle;
68
         sharedElements.addToElement(toView, key);
69
         sharedElements.addToElement(toView, key);
69
     }
70
     }
70
 
71
 
72
+    @Override
73
+    protected void onConfigurationChanged(Configuration newConfig) {
74
+        super.onConfigurationChanged(newConfig);
75
+        setStyle();
76
+    }
77
+
71
     @Override
78
     @Override
72
     public void onEvent(Event event) {
79
     public void onEvent(Event event) {
73
         if (ContextualMenuHiddenEvent.TYPE.equals(event.getType()) && isShown()) {
80
         if (ContextualMenuHiddenEvent.TYPE.equals(event.getType()) && isShown()) {