GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — 修复 width height wrap_content padding margin 导致 的问题 · ftyangjun/SmartRefreshLayout@c411783

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • refresh-layout-kernel/src/main/java/com/scwang/smart/refresh/layout
    • SmartRefreshLayout.java
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎refresh-layout-kernel/src/main/java/com/scwang/smart/refresh/layout/SmartRefreshLayout.java‎

Copy file name to clipboardExpand all lines: refresh-layout-kernel/src/main/java/com/scwang/smart/refresh/layout/SmartRefreshLayout.java
+4-3Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -594,11 +594,12 @@ protected void onMeasure(final int widthMeasureSpec,final int heightMeasureSpec)
594594
((needPreview && showHeader) ? mHeaderHeight : 0) +
595595
((needPreview && showFooter) ? mFooterHeight : 0), lp.height);
596596
contentView.measure(widthSpec, heightSpec);
597-
minimumWidth += contentView.getMeasuredWidth();
598-
minimumHeight += contentView.getMeasuredHeight();
597+
minimumWidth += contentView.getMeasuredWidth() + mlp.leftMargin + mlp.rightMargin;
598+
minimumHeight += contentView.getMeasuredHeight() + mlp.topMargin + mlp.bottomMargin;
599599
}
600600
}
601-
601+
minimumWidth += thisView.getPaddingLeft() + thisView.getPaddingRight();
602+
minimumHeight += thisView.getPaddingTop() + thisView.getPaddingBottom();
602603
super.setMeasuredDimension(
603604
View.resolveSize(Math.max(minimumWidth, super.getSuggestedMinimumWidth()), widthMeasureSpec),
604605
View.resolveSize(Math.max(minimumHeight, super.getSuggestedMinimumHeight()), heightMeasureSpec));

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.