Skip to content

Commit

Permalink
android: Fix restart on resizing or splitting screen
Browse files Browse the repository at this point in the history
This fixes an issue where the app would restart on entering split
screen, or on resizing the app's side of a split screen.

Basically this line of the Android manifest is making an assurance to
the system that the app is prepared to handle these changes; docs here:
  https://developer.android.com/guide/topics/manifest/activity-element#config
When the system doesn't get that assurance, it just restarts the app
from scratch to be sure.

And empirically the app indeed does just fine when we add those
assurances and then go ahead and switch to split-screen mode, or
resize the app's portion of the split screen.  That layer of things is
basically all RN's job, so RN is handling this just fine -- we just
haven't been letting the system know that we're ready to do so.

Also got this fixed in the RN template app upstream:
  facebook/react-native#32536
  facebook/react-native@fc962c9b6

[greg: expanded commit message]

Fixes: zulip#5068
  • Loading branch information
Somena1 authored and chetas411 committed Nov 28, 2021
1 parent 48af783 commit 36bec33
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
android:theme="@style/AppTheme">
<activity
android:name=".MainActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize|uiMode"
android:label="@string/app_name"
android:launchMode="singleTask"
android:windowSoftInputMode="adjustResize">
Expand Down

0 comments on commit 36bec33

Please sign in to comment.