Reputation: 43
i have a strange problem with my react-native app. On Emulator and real device, the app doesnt response to orientation change.
I use react-navigation with StackNavigator and native-base for UI.
AndroidManifest contains android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
"react-native": "0.61.5",
"react-native-screens": "^2.0.0-alpha.13",
"react-navigation": "^4.0.10",
"react-native-gesture-handler": "^1.5.2",
"native-base": "^2.13.8"
But the problem was present also with previous modules and react-native version.
Thanks
Fixed
Adding android:screenOrientation="sensor" resolve the problem.
Upvotes: 0
Views: 641
Reputation: 1351
Have you set the orientation:
For iOS like the picture below:
For Android in Manifest Android Setting
Upvotes: 2