Browse Source

feat(mobile/navigation): added screen orientation based on Platform

master
Calin Chitu 3 years ago
parent
commit
dfa761b963
1 changed files with 21 additions and 4 deletions
  1. 21
    4
      react/features/mobile/navigation/screenOptions.js

+ 21
- 4
react/features/mobile/navigation/screenOptions.js View File

1
 import React from 'react';
1
 import React from 'react';
2
+import { Platform } from 'react-native';
2
 
3
 
3
 import {
4
 import {
4
     Icon,
5
     Icon,
42
     headerShown: true,
43
     headerShown: true,
43
     headerStyle: {
44
     headerStyle: {
44
         backgroundColor: BaseTheme.palette.screen02Header
45
         backgroundColor: BaseTheme.palette.screen02Header
45
-    }
46
+    },
47
+    orientation: Platform.select({
48
+        ios: 'default',
49
+        android: 'all'
50
+    })
46
 };
51
 };
47
 
52
 
48
 /**
53
 /**
134
 export const conferenceScreenOptions = {
139
 export const conferenceScreenOptions = {
135
     animation: 'default',
140
     animation: 'default',
136
     gestureEnabled: false,
141
     gestureEnabled: false,
137
-    headerShown: false
142
+    headerShown: false,
143
+    orientation: Platform.select({
144
+        ios: 'default',
145
+        android: 'all'
146
+    })
138
 };
147
 };
139
 
148
 
140
 /**
149
 /**
164
     },
173
     },
165
     headerTitleStyle: {
174
     headerTitleStyle: {
166
         color: BaseTheme.palette.text01
175
         color: BaseTheme.palette.text01
167
-    }
176
+    },
177
+    orientation: Platform.select({
178
+        ios: 'default',
179
+        android: 'all'
180
+    })
168
 };
181
 };
169
 
182
 
170
 /**
183
 /**
250
     },
263
     },
251
     headerTitleStyle: {
264
     headerTitleStyle: {
252
         color: BaseTheme.palette.text01
265
         color: BaseTheme.palette.text01
253
-    }
266
+    },
267
+    orientation: Platform.select({
268
+        ios: 'default',
269
+        android: 'all'
270
+    })
254
 };
271
 };

Loading…
Cancel
Save