From 711d62c984df06a4e2913cd26c690acc6a516d22 Mon Sep 17 00:00:00 2001 From: John Trujillo Date: Mon, 18 May 2026 12:25:27 -0500 Subject: [PATCH] fix(editor): remove persistent space obscuring Find in File dialog Adjust action container margins dynamically based on IME visibility to save screen real estate. --- app/src/main/res/layout/content_editor.xml | 3 +- .../editor/ui/EditorSearchLayout.kt | 24 ++-- .../main/res/layout/layout_find_in_file.xml | 108 +++++++++--------- 3 files changed, 69 insertions(+), 66 deletions(-) diff --git a/app/src/main/res/layout/content_editor.xml b/app/src/main/res/layout/content_editor.xml index 46c3c9e20e..0df1c2023e 100644 --- a/app/src/main/res/layout/content_editor.xml +++ b/app/src/main/res/layout/content_editor.xml @@ -108,8 +108,7 @@ + android:layout_height="match_parent" /> + updateActionsBottomMargin(insets.isVisible(WindowInsetsCompat.Type.ime())) + insets + } addView( findInFileBinding.root, @@ -269,7 +273,7 @@ class EditorSearchLayout(context: Context, val editor: IDEEditor) : FrameLayout( try { Pattern.compile(it) it - } catch (error: Throwable) { + } catch (_: Throwable) { "" } } else { @@ -282,4 +286,10 @@ class EditorSearchLayout(context: Context, val editor: IDEEditor) : FrameLayout( } } } + + private fun updateActionsBottomMargin(isImeVisible: Boolean) { + findInFileBinding.actionsContainer.updateLayoutParams { + bottomMargin = if (isImeVisible) 0 else collapsedSheetMargin + } + } } diff --git a/editor/src/main/res/layout/layout_find_in_file.xml b/editor/src/main/res/layout/layout_find_in_file.xml index 360ef55b98..1f3c8a48de 100644 --- a/editor/src/main/res/layout/layout_find_in_file.xml +++ b/editor/src/main/res/layout/layout_find_in_file.xml @@ -62,68 +62,62 @@ app:layout_constraintTop_toTopOf="@id/search_input" /> - + app:layout_constraintTop_toBottomOf="@id/search_input"> + - + - + - + + +