From 8c283184749c79cf287984faf951f532c657d56f Mon Sep 17 00:00:00 2001 From: Nik Clayton Date: Sun, 27 Oct 2024 12:38:34 +0100 Subject: [PATCH] fix: Retain task state for MainActivity and ComposeActivity (#1055) Some users report that returning to the `ComposeActivity` loses content they've entered and returns to `MainActivity`. I can't reproduce this, but it's possible that Android is clearing the task state and returning to the root activity (`MainActivity` in this case). Set `alwaysRetainTaskState` to true to keep the activity stack, and hopefully prevent this from happening. --- app/src/main/AndroidManifest.xml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index aca685017..a05512aed 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -51,6 +51,7 @@ @@ -114,7 +115,8 @@ + android:windowSoftInputMode="stateVisible|adjustResize" + android:alwaysRetainTaskState="true" />