fix(instance-info): remove space below description

This commit is contained in:
FineFindus 2023-05-23 16:07:07 +02:00
parent a9283bfec8
commit 333c47339d
No known key found for this signature in database
GPG Key ID: 64873EE210FF8E6B
1 changed files with 2 additions and 1 deletions

View File

@ -260,6 +260,8 @@ public class InstanceInfoFragment extends LoaderFragment {
//set description text and collapse //set description text and collapse
updateDescription(); updateDescription();
textScrollView.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT));
description.measure( description.measure(
View.MeasureSpec.makeMeasureSpec(textWrap.getWidth(), View.MeasureSpec.EXACTLY), View.MeasureSpec.makeMeasureSpec(textWrap.getWidth(), View.MeasureSpec.EXACTLY),
View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED)); 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); readMore.setText(isExpanded ? R.string.sk_collapse : R.string.sk_expand);
description.post(() -> { description.post(() -> {
boolean tooBig = description.getMeasuredHeight() > textMaxHeight; boolean tooBig = description.getMeasuredHeight() > textMaxHeight;
Log.e("toobig", "bindHeaderView: " + tooBig );
readMore.setVisibility(tooBig ? View.VISIBLE : View.GONE); readMore.setVisibility(tooBig ? View.VISIBLE : View.GONE);
textScrollView.setLayoutParams(tooBig && !isExpanded ? collapseParams : wrapParams); textScrollView.setLayoutParams(tooBig && !isExpanded ? collapseParams : wrapParams);
}); });