react-native-navigation icon indicating copy to clipboard operation
react-native-navigation copied to clipboard

I need my Android app to be in SCREEN_ORIENTATION_SENSOR_PORTRAIT orientation

Open zabojad opened this issue 3 years ago • 5 comments

🐛 Bug Report

I need my Android app to be in SCREEN_ORIENTATION_SENSOR_PORTRAIT (Android) orientation but RNN is proposing only portrait and landscape values.

Could we add support for all platforms specific possible orientation values?

Your Environment

  • React Native Navigation version: 7.25.1
  • React Native version: 0.66.3
  • Platform(s) (iOS, Android, or both?): Android
  • Device info (Simulator/Device? OS version? Debug/Release?): all

zabojad avatar Feb 08 '22 09:02 zabojad

Use sensorLandscape for layout/orientation

manuhook avatar Feb 08 '22 14:02 manuhook

In my case, it would be sensorPortrait... It's not in the type definition of the orientation option...

I'll try it anyway...

zabojad avatar Feb 08 '22 16:02 zabojad

It does not work. Il unlocks all orientations when using sensorPortrait

zabojad avatar Feb 08 '22 16:02 zabojad

OK, it's not managed apparently: https://github.com/wix/react-native-navigation/blob/b53f13c60fe6498ad1690adf1dfd7509f602965c/lib/android/app/src/main/java/com/reactnativenavigation/options/Orientation.java.

I believe it would not be a big work to add it. Could it be selected for a later version?

zabojad avatar Feb 08 '22 16:02 zabojad

I'll PR something very soon, it's easy to solve...

zabojad avatar Feb 08 '22 16:02 zabojad