Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android app crash when orientation change to landscape #393

Open
raphaelPloomes opened this issue Feb 9, 2021 · 0 comments
Open

Android app crash when orientation change to landscape #393

raphaelPloomes opened this issue Feb 9, 2021 · 0 comments

Comments

@raphaelPloomes
Copy link

When I call the Orientation.lockToLandscape() I have the following error:

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant