Android app crash when orientation change to landscape
raphaelPloomes opened this issue · 0 comments
When I call the Orientation.lockToLandscape() I have the following error:
If I start the app in landscape and switch to portrait, the error doesn't happen
My activity tag in AndroidManifest.xml :
<activity android:name=".MainActivity" android:label="@string/app_name" android:configChanges="keyboard|keyboardHidden|orientation|screenSize" android:launchMode="singleTask" android:exported="true">
Overriding the method in MainActivity.Java :
@Override public void onConfigurationChanged(Configuration newConfig) { super.onConfigurationChanged(newConfig); Intent intent = new Intent("onConfigurationChanged"); intent.putExtra("newConfig", newConfig); this.sendBroadcast(intent); }
react-native: 0.61.5
react-navigation: 2.12.1
Any solution?