From 333c47339d490d0157c00543695071e8fed8a015 Mon Sep 17 00:00:00 2001 From: FineFindus Date: Tue, 23 May 2023 16:07:07 +0200 Subject: [PATCH] fix(instance-info): remove space below description --- .../joinmastodon/android/fragments/InstanceInfoFragment.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mastodon/src/main/java/org/joinmastodon/android/fragments/InstanceInfoFragment.java b/mastodon/src/main/java/org/joinmastodon/android/fragments/InstanceInfoFragment.java index eb27a18c5..330e429a1 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/fragments/InstanceInfoFragment.java +++ b/mastodon/src/main/java/org/joinmastodon/android/fragments/InstanceInfoFragment.java @@ -260,6 +260,8 @@ public class InstanceInfoFragment extends LoaderFragment { //set description text and collapse updateDescription(); + textScrollView.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT)); + description.measure( View.MeasureSpec.makeMeasureSpec(textWrap.getWidth(), View.MeasureSpec.EXACTLY), View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED)); @@ -267,7 +269,6 @@ public class InstanceInfoFragment extends LoaderFragment { readMore.setText(isExpanded ? R.string.sk_collapse : R.string.sk_expand); description.post(() -> { boolean tooBig = description.getMeasuredHeight() > textMaxHeight; - Log.e("toobig", "bindHeaderView: " + tooBig ); readMore.setVisibility(tooBig ? View.VISIBLE : View.GONE); textScrollView.setLayoutParams(tooBig && !isExpanded ? collapseParams : wrapParams); });