From 77733cebe55fb85850a6f5fb31e853bb9d2119ea Mon Sep 17 00:00:00 2001 From: David Sandquist Date: Mon, 31 Aug 2026 17:26:54 +0200 Subject: [PATCH 1/2] Keep grid item badges and labels attached to the cell In grid view the file feature badges (shared, favorite, video, live photo, synced) were positioned against the whole grid cell rather than against the thumbnail image. The thumbnail is a 1:1 SquareImageView whose resolved size is bounded by the cell height, so when a cell is wider than it is tall the drawn image is narrower than the cell. Because the badge cluster used layout_constraintStart_toStartOf="parent" layout_constraintEnd_toEndOf="parent" layout_constraintHorizontal_bias="0.85" the 0.85 bias was applied across the full cell width instead of across the image, which pushed the badges into the empty space to the right of the thumbnail. Anchor them to the thumbnail so they stay on the image at any cell width. The file name had the matching problem from the other direction: it was given 75% of the cell and centred, with the overflow button placed in the leftover gap, so on a wide cell the button drifted away from the label it belongs to. Let the name take the width the overflow button does not need, which both keeps the two together and leaves more room for the name itself. This is only noticeable when cells are wide, which is why it shows up on tablets and in landscape on phones while looking correct in portrait on a phone, where the cell width is close to the image width. Signed-off-by: David Sandquist --- app/src/main/res/layout/grid_item.xml | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/app/src/main/res/layout/grid_item.xml b/app/src/main/res/layout/grid_item.xml index 97e1084bdbd6..f459a733efd1 100644 --- a/app/src/main/res/layout/grid_item.xml +++ b/app/src/main/res/layout/grid_item.xml @@ -53,11 +53,11 @@ android:orientation="horizontal" android:padding="@dimen/standard_quarter_padding" android:translationZ="4dp" - app:layout_constraintBottom_toBottomOf="@+id/thumbnail" - app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintBottom_toBottomOf="@id/thumbnail" + app:layout_constraintEnd_toEndOf="@id/thumbnail" app:layout_constraintHorizontal_bias="0.85" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toTopOf="parent" + app:layout_constraintStart_toStartOf="@id/thumbnail" + app:layout_constraintTop_toTopOf="@id/thumbnail" app:layout_constraintVertical_bias="0.85"> Date: Thu, 10 Sep 2026 14:06:16 +0200 Subject: [PATCH 2/2] fix(grid): center grid item filename under thumbnail Anchoring the badges and labels to the thumbnail edges instead of the parent also changed the filename constraint from "toStartOf @id/more" and dropped the width_percent/bias pair, which centered the label independent of the "more" button. That shifted the visible text left of the cell's true center. Restore the 75%-width, 50%-bias centering, so the label centers under the thumbnail as it did before this change. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01Y6xkzesJQ1b7u45hZEE8mV Signed-off-by: David Sandquist --- app/src/main/res/layout/grid_item.xml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/res/layout/grid_item.xml b/app/src/main/res/layout/grid_item.xml index f459a733efd1..45370ef14a18 100644 --- a/app/src/main/res/layout/grid_item.xml +++ b/app/src/main/res/layout/grid_item.xml @@ -211,9 +211,11 @@ android:text="@string/placeholder_filename" android:textSize="@dimen/grid_item_text_size" app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintEnd_toStartOf="@id/more" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintHorizontal_bias="0.5" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@id/thumbnail" + app:layout_constraintWidth_percent="0.75" tools:visibility="visible" />