fix: android scroller child measure

This commit is contained in:
王劲鹏 2021-06-17 15:30:01 +08:00 committed by osborn
parent 28513efd67
commit 1ddd0c05a8

View File

@ -543,9 +543,7 @@ public class HVScrollView extends FrameLayout implements NestedScrollingParent,
int childWidthMeasureSpec;
int childHeightMeasureSpec;
final FrameLayout.LayoutParams lp = (LayoutParams) child.getLayoutParams();
if (lp.width != ViewGroup.LayoutParams.MATCH_PARENT && lp.height != ViewGroup.LayoutParams.MATCH_PARENT) {
return;
}
if (child.getMeasuredWidth() < width && lp.width == ViewGroup.LayoutParams.MATCH_PARENT) {
childWidthMeasureSpec = MeasureSpec.makeMeasureSpec(width, MeasureSpec.EXACTLY);
} else {