diff --git a/src/Core/src/Platform/Android/MauiScrollView.cs b/src/Core/src/Platform/Android/MauiScrollView.cs index 034bf12073aa..444372df851b 100644 --- a/src/Core/src/Platform/Android/MauiScrollView.cs +++ b/src/Core/src/Platform/Android/MauiScrollView.cs @@ -187,9 +187,14 @@ protected override void OnLayout(bool changed, int left, int top, int right, int { base.OnLayout(changed, left, top, right, bottom); - if (_hScrollView != null && _hScrollView.Parent == this) + if (_hScrollView?.Parent == this && _content is not null) { - _hScrollView.Layout(0, 0, right - left, bottom - top); + double scrollViewContentHeight = _content.Height; + var hScrollViewHeight = bottom - top; + //if we are scrolling both ways we need to lay out our MauiHorizontalScrollView with more than the available height + //so its parent the NestedScrollView can scroll vertically + var newBottom = _isBidirectional ? Math.Max(hScrollViewHeight, scrollViewContentHeight) : hScrollViewHeight; + _hScrollView.Layout(0, 0, right - left, (int)newBottom); } if (CrossPlatformArrange == null)