From 84a54baff654e803fadc92b7ec72d6fbd28152ea Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 18 Oct 2026 14:34:11 +0000 Subject: [PATCH] fix(android): deliver IME insets with adjustResize so the composer clears the keyboard The chat composer lifts itself with imePadding(), which reads the live IME insets. With adjustNothing, Android 8-10 never report those insets, so the keyboard covered the composer there. MainActivity is edge-to-edge, so adjustResize only delivers the insets and never resizes the window; imePadding() stays the single IME owner on every API level. Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_01KNHb7X51sAvMgM3ZWCp3Bg --- android/app/src/main/AndroidManifest.xml | 2 +- .../AidenOnTheGo/features/chat/AidenChatDetailScreen.kt | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index e3a4d21ee8..5d3afc75a6 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -30,7 +30,7 @@ + android:windowSoftInputMode="adjustResize"> diff --git a/android/app/src/main/java/sbtbiswas/AidenOnTheGo/features/chat/AidenChatDetailScreen.kt b/android/app/src/main/java/sbtbiswas/AidenOnTheGo/features/chat/AidenChatDetailScreen.kt index 089eb5bf6d..35fd80c62a 100644 --- a/android/app/src/main/java/sbtbiswas/AidenOnTheGo/features/chat/AidenChatDetailScreen.kt +++ b/android/app/src/main/java/sbtbiswas/AidenOnTheGo/features/chat/AidenChatDetailScreen.kt @@ -566,9 +566,12 @@ fun AidenChatDetailScreen( modifier = Modifier .fillMaxWidth() .windowInsetsPadding(WindowInsets.navigationBars) - // MainActivity uses adjustNothing, so this is the one IME owner. - // Insets consumption contributes only the IME delta beyond the - // navigation bar and keeps the whole composer above the keyboard. + // MainActivity is edge-to-edge, so adjustResize only delivers IME + // insets (Android 8-10 need it to report them at all) and never + // resizes the window: this is the one IME owner. The padding follows + // the live insets, so a return from another app with the keyboard + // restored lifts the composer again. Insets consumption contributes + // only the IME delta beyond the navigation bar. .imePadding() .aidenReadableWidth() .zIndex(1f)