Francesco Bramato
Francesco Bramato

Reputation: 43

react-native app doenst respond to orientation change

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

Answers (1)

zidniryi
zidniryi

Reputation: 1351

Have you set the orientation: For iOS like the picture below: enter image description here

For Android in Manifest Android Setting

Upvotes: 2

Related Questions