Wasif Mustahid
Wasif Mustahid

Reputation: 291

React Native Orientation does not listening Current System Auto Rotate Status

Im using react-native-orientation . I want to lock initial login screen in portrait mode. so i have used Orientation.lockToPortrait() in app.tsx ,and Orientation.unlockAllOrientations() in a screen's constructor that i want to enable rotation again.

But the problem is when Device/emulators system auto rotate Disabled from notification bar it still rotates.I want to rotate if Device/emulators system auto rotate enabled. otherwise not.

So is there any way to listen system/device rotation status? or any suggestion?

Upvotes: 0

Views: 407

Answers (1)

Wasif Mustahid
Wasif Mustahid

Reputation: 291

react-native-orientation the package dont have such feature react-native-orientation-locker solved my problem.

Upvotes: 0

Related Questions