yamill / react-native-orientation

Listen to device orientation changes in react-native and set preferred orientation on screen to screen basis.
https://www.npmjs.com/package/react-native-orientation
ISC License
1.72k stars 810 forks source link

Only fullscreen activities can request orientation #342

Open Jeijie opened 5 years ago

Jeijie commented 5 years ago

when I call Orientation.lockToLandscape(),App crash on resume.

log: Only fullscreen activities can request orientation

"react-native-orientation": "^3.1.3",

Environment: OS: Windows 7 Node: 8.12.0 Yarn: 1.9.4 npm: 6.4.1 Watchman: Not Found Xcode: N/A Android Studio: Not Found

Packages: (wanted => installed) react: 16.3.1 => 16.3.1 react-native: ^0.55.4 => 0.55.4

retyui commented 5 years ago

Use a react-native-orientation-locker module with normal support ! :+1:

Jeijie commented 5 years ago

@retyui thanks,it works well.