Skip to content

Commit

Permalink
fix: prevent activity recreation on theme change (#26413)
Browse files Browse the repository at this point in the history
Summary:
On Android 10 whole activity is recreated when the user changes system theme. We should prevent it by adding `uiMode` in `android:configChanges` key in the default template.

## Changelog

[Android] [Fixed] - Android 10: Prevent activity recreation on theme change
Pull Request resolved: #26413

Test Plan: NOOP

Differential Revision: D17342811

Pulled By: cpojer

fbshipit-source-id: 2bed9b5f91e1b67451fefe34b02a1129d6c80d15
  • Loading branch information
Esemesek authored and facebook-github-bot committed Sep 12, 2019
1 parent 6f5c357 commit 83a16b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion template/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode"
android:windowSoftInputMode="adjustResize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
Expand Down

0 comments on commit 83a16b1

Please sign in to comment.