fix: android scroller child measure
This commit is contained in:
parent
28513efd67
commit
1ddd0c05a8
@ -543,9 +543,7 @@ public class HVScrollView extends FrameLayout implements NestedScrollingParent,
|
|||||||
int childWidthMeasureSpec;
|
int childWidthMeasureSpec;
|
||||||
int childHeightMeasureSpec;
|
int childHeightMeasureSpec;
|
||||||
final FrameLayout.LayoutParams lp = (LayoutParams) child.getLayoutParams();
|
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) {
|
if (child.getMeasuredWidth() < width && lp.width == ViewGroup.LayoutParams.MATCH_PARENT) {
|
||||||
childWidthMeasureSpec = MeasureSpec.makeMeasureSpec(width, MeasureSpec.EXACTLY);
|
childWidthMeasureSpec = MeasureSpec.makeMeasureSpec(width, MeasureSpec.EXACTLY);
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user