From 3a18451307ba4a411d93b9f77ba199eab842ac33 Mon Sep 17 00:00:00 2001 From: Nik Clayton Date: Fri, 25 Oct 2024 14:30:21 +0200 Subject: [PATCH] fix: Ensure caption field is always visible (#1052) Constrain caption image height so the caption field is always visible. Allow for at least 4 lines of space to enter the caption. --- app/src/main/res/layout/dialog_image_description.xml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/src/main/res/layout/dialog_image_description.xml b/app/src/main/res/layout/dialog_image_description.xml index 81b61a40b..b9cbabcdf 100644 --- a/app/src/main/res/layout/dialog_image_description.xml +++ b/app/src/main/res/layout/dialog_image_description.xml @@ -10,12 +10,13 @@ android:id="@+id/imageDescriptionView" android:layout_width="match_parent" android:layout_height="wrap_content" + app:layout_constrainedHeight="true" android:contentDescription="@string/post_media_image" android:focusable="false" + app:layout_constraintBottom_toTopOf="@id/textInputLayout" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" - app:layout_constraintBottom_toTopOf="@id/textInputLayout" app:layout_constraintVertical_chainStyle="spread_inside" tools:srcCompat="@tools:sample/backgrounds/scenic" /> @@ -24,13 +25,15 @@ style="@style/AppTextInput" android:layout_width="match_parent" android:layout_height="wrap_content" + android:layout_marginTop="16dp" android:paddingHorizontal="?dialogPreferredPadding" app:counterEnabled="true" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constrainedHeight="true" - app:layout_constraintTop_toBottomOf="@id/imageDescriptionView"> + app:layout_constraintTop_toBottomOf="@id/imageDescriptionView" + app:layout_constraintVertical_weight="1">