Is it possible in react native to have the app run in portrait mode but have one page run in landscape mode? I know in xcode you have to select portrait or landscape at the beginning so I am a little confused as to how to make all pages in the app portrait except one.
Screen orientation lock For Android, open the AndroidManifest. xml file and within the activity element add 'android:screenOrientation="portrait"' to lock to portrait or 'android:screenOrientation="landscape"' to lock to landscape.
The screen orientation attribute is provided by the activity element in the Android Manifest. Xml file. The orientations provided by the activity are Portrait, Landscape, Sensor, Unspecified and so on. To perform a screen orientation activity you define the properties in the Android Manifest.
In react navigation v6 u can do this:
<AppStack.Screen
name="VehiclesDetailsAuction"
component={VehiclesDetailsAuction}
options={{ orientation: 'portrait' }}
/>
<AppStack.Screen
name="VehicleImageView"
component={VehicleImageView}
options={{ orientation: 'all' }}
/>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With