From 6cf214f127d2709822cc90ad41648705cbfebba1 Mon Sep 17 00:00:00 2001 From: sk Date: Mon, 12 Jun 2023 15:39:38 +0200 Subject: [PATCH] fix header disappearing in some cases closes sk22#570 --- .../displayitems/HeaderStatusDisplayItem.java | 3 + .../main/res/layout/display_item_header.xml | 134 +++++++++--------- 2 files changed, 70 insertions(+), 67 deletions(-) diff --git a/mastodon/src/main/java/org/joinmastodon/android/ui/displayitems/HeaderStatusDisplayItem.java b/mastodon/src/main/java/org/joinmastodon/android/ui/displayitems/HeaderStatusDisplayItem.java index 4e4eb4a9e..9a624a1c4 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/ui/displayitems/HeaderStatusDisplayItem.java +++ b/mastodon/src/main/java/org/joinmastodon/android/ui/displayitems/HeaderStatusDisplayItem.java @@ -399,6 +399,9 @@ public class HeaderStatusDisplayItem extends StatusDisplayItem{ else collapseBtnIcon.animate().scaleY(item.status.textExpanded ? -1 : 1).start(); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) collapseBtn.setTooltipText(collapseText); } + + itemView.setPaddingRelative(itemView.getPaddingStart(), itemView.getPaddingTop(), + item.inset ? V.dp(10) : V.dp(4), itemView.getPaddingBottom()); } @Override diff --git a/mastodon/src/main/res/layout/display_item_header.xml b/mastodon/src/main/res/layout/display_item_header.xml index b976d7400..72632d5df 100644 --- a/mastodon/src/main/res/layout/display_item_header.xml +++ b/mastodon/src/main/res/layout/display_item_header.xml @@ -6,79 +6,79 @@ android:paddingEnd="4dp" android:paddingStart="16dp"> - - - - - - - - - + android:layout_alignParentEnd="true"> + + + + + + + + + + - + + + + + - @@ -127,7 +127,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginEnd="8dp" - android:layout_toStartOf="@id/unread_indicator" + android:layout_toStartOf="@id/buttons" android:layout_toEndOf="@id/avatar" android:layout_alignBottom="@id/avatar" android:layoutDirection="locale"