fix(android): crash on orientation change due to activity recreation (#6261)

This commit is contained in:
Lucas Fernandes Nogueira
2023-02-13 15:20:52 -08:00
committed by GitHub
parent 65e487f344
commit 947eb391ca
4 changed files with 11 additions and 1 deletions

View File

@@ -0,0 +1,6 @@
---
"cli.rs": patch
"cli.js": patch
---
Update Android project template with fix to crash on orientation change.

View File

@@ -4111,7 +4111,7 @@ dependencies = [
[[package]]
name = "wry"
version = "0.27.0"
source = "git+https://github.com/tauri-apps/wry?branch=dev#fc113d6e85ca5cd899c1f9c8c28a1e3c13612698"
source = "git+https://github.com/tauri-apps/wry?branch=dev#9975dda12a122051b375ec6485650546d2d91c26"
dependencies = [
"base64 0.13.1",
"block",

View File

@@ -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>

View File

@@ -1,3 +1,4 @@
<resources>
<string name="app_name">{{app.stylized-name}}</string>
<string name="main_activity_title">{{app.stylized-name}}</string>
</resources>