Skip to content

Commit 83a16b1

Browse files
Esemesekfacebook-github-bot
authored andcommitted
fix: prevent activity recreation on theme change (#26413)
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
1 parent 6f5c357 commit 83a16b1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

template/android/app/src/main/AndroidManifest.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<activity
1414
android:name=".MainActivity"
1515
android:label="@string/app_name"
16-
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
16+
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode"
1717
android:windowSoftInputMode="adjustResize">
1818
<intent-filter>
1919
<action android:name="android.intent.action.MAIN" />

0 commit comments

Comments
 (0)