From 77976ea974ee2e7d6f61185c6fb1de20266a9c7c Mon Sep 17 00:00:00 2001 From: Bruno Deanoz Date: Mon, 22 Jun 2026 01:13:40 +0200 Subject: [PATCH] =?UTF-8?q?move=20imePadding=20to=20outer=20Box=20?= =?UTF-8?q?=E2=80=94=20fix=20input=20floating=20into=20chat=20area?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The root cause: imePadding on the bottom dock Column inflated it by the full keyboard height, pushing it up into the chat content. Fix: imePadding on the outer Box that contains everything. Now the entire layout shrinks when keyboard opens — chat area gets shorter, dock stays at the (new) bottom edge. No overlap. --- .../java/dev/kaizen/app/chat/ChatScreen.kt | 23 ++++++++----------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/app/src/main/java/dev/kaizen/app/chat/ChatScreen.kt b/app/src/main/java/dev/kaizen/app/chat/ChatScreen.kt index 2057584..054f50b 100644 --- a/app/src/main/java/dev/kaizen/app/chat/ChatScreen.kt +++ b/app/src/main/java/dev/kaizen/app/chat/ChatScreen.kt @@ -535,7 +535,7 @@ fun ChatScreen( gesturesEnabled = true // Allows swiping from the screen's left edge to open the drawer ) { MeshBackground { - Box(Modifier.fillMaxSize(), contentAlignment = Alignment.Center) { + Box(Modifier.fillMaxSize().imePadding(), contentAlignment = Alignment.Center) { // 1. Scrollable Chat Content // Stretches to the full screen, allowing bubbles to scroll cleanly behind the floating bottom dock. // Centered layout with responsive width capping on tablets. @@ -707,24 +707,21 @@ fun ChatScreen( Column( modifier = Modifier .align(Alignment.BottomCenter) - .then( + .background( if (imeVisible) { - Modifier.background(scrimColor) + Brush.verticalGradient(listOf(scrimColor, scrimColor)) } else { - Modifier.background( - Brush.verticalGradient( - colorStops = arrayOf( - 0f to Color.Transparent, - 0.35f to scrimColor.copy(alpha = 0.6f), - 0.7f to scrimColor.copy(alpha = 0.92f), - 1f to scrimColor, - ), - ) + Brush.verticalGradient( + colorStops = arrayOf( + 0f to Color.Transparent, + 0.35f to scrimColor.copy(alpha = 0.6f), + 0.7f to scrimColor.copy(alpha = 0.92f), + 1f to scrimColor, + ), ) } ) .navigationBarsPadding() - .imePadding() .then(if (isTablet) Modifier.widthIn(max = 720.dp) else Modifier) ) { if (!imeVisible) {