Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Android ListView header / footer gone (#12312) #13712

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -576,12 +576,9 @@ public IPlatformViewHandler Child

protected override void OnLayout(bool changed, int l, int t, int r, int b)
{
if (_child?.PlatformView == null)
{
return;
}

_child.PlatformView.Layout(l, t, r, b);
// should not update platform view layout here
// because the top and bottom value from parameters are relative to current scroll position when it is call
// this mean top value might be nagative if header are off screen when user scroll back up
}

protected override void OnMeasure(int widthMeasureSpec, int heightMeasureSpec)
Expand All @@ -592,6 +589,7 @@ protected override void OnMeasure(int widthMeasureSpec, int heightMeasureSpec)
return;
}

_child.PlatformView.Layout(0, 0, widthMeasureSpec, heightMeasureSpec);
ooikengsiang marked this conversation as resolved.
Show resolved Hide resolved
_child.PlatformView.Measure(widthMeasureSpec, heightMeasureSpec);
SetMeasuredDimension(_child.PlatformView.MeasuredWidth, _child.PlatformView.MeasuredHeight);
}
Expand Down