I am developing a React Native App for iOS and Android using wix/react-native-navigation.
I am using
react-native@0.55.4
react-native-navigation@^1.1.478
While researching how to force an Android App into portrait mode I found tons of answers basically saying either of these two options is the way to go:
- Adjust the manifest file:
<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:configChanges="orientation|screenSize"
android:windowSoftInputMode="adjustResize"
android:screenOrientation="portrait">
- Set the orientation programmatically in the
MainActivity.java
:
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
}
But neither has worked for me.