From 1ddd0c05a8d9708eedec59c4536db11d81b1b775 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=8A=B2=E9=B9=8F?= Date: Thu, 17 Jun 2021 15:30:01 +0800 Subject: [PATCH] fix: android scroller child measure --- .../doric/src/main/java/pub/doric/widget/HVScrollView.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/doric-android/doric/src/main/java/pub/doric/widget/HVScrollView.java b/doric-android/doric/src/main/java/pub/doric/widget/HVScrollView.java index 940927ea..6d71b476 100644 --- a/doric-android/doric/src/main/java/pub/doric/widget/HVScrollView.java +++ b/doric-android/doric/src/main/java/pub/doric/widget/HVScrollView.java @@ -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 {