Skip to content

Commit

Permalink
- add additional comments
Browse files Browse the repository at this point in the history
  • Loading branch information
PureWeen committed Mar 4, 2024
1 parent c694f59 commit 0408f1f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Core/src/Platform/Android/MauiScrollView.cs
Expand Up @@ -195,6 +195,11 @@ protected override void OnMeasure(int widthMeasureSpec, int heightMeasureSpec)
{
base.OnMeasure(widthMeasureSpec, heightMeasureSpec);

// If we have bidirectional scrolling then we can just let everything flow through naturally.
// The HorizontalScrollView will automatically size its height to the content and thus enable
// vertical scolling
// If we're only enabling horizontal scrolling then we want to force the horizontal scrollView
// to be the same size as the NestedScrollView this way it can't be scrolled vertically
if (_hScrollView?.Parent == this && _content is not null && !_isBidirectional)
{
var hScrollViewHeight = this.MeasuredHeight;
Expand Down

0 comments on commit 0408f1f

Please sign in to comment.