Skip to content

Commit

Permalink
fix(android): crash on orientation change due to activity recreation (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasfernog committed Feb 13, 2023
1 parent 65e487f commit 947eb39
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .changes/fix-orientation-crash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"cli.rs": patch
"cli.js": patch
---

Update Android project template with fix to crash on orientation change.
2 changes: 1 addition & 1 deletion examples/api/src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
android:theme="@style/Theme.{{snake-case app.name}}"
android:usesCleartextTraffic="${usesCleartextTraffic}">
<activity
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|smallestScreenSize|screenLayout|uiMode"
android:launchMode="singleTask"
android:label="@string/main_activity_title"
android:name=".MainActivity"
android:exported="true">
<intent-filter>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<resources>
<string name="app_name">{{app.stylized-name}}</string>
<string name="main_activity_title">{{app.stylized-name}}</string>
</resources>

0 comments on commit 947eb39

Please sign in to comment.