Skip to content

Commit

Permalink
Fix android customcell measure
Browse files Browse the repository at this point in the history
  • Loading branch information
muak committed Apr 3, 2023
1 parent 22a36f1 commit 1dd6a66
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions SettingsView/Platforms/Android/FormsViewContainer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,10 @@ protected override void OnMeasure(int widthMeasureSpec, int heightMeasureSpec)
return;
}

var measure = _viewHandler.MeasureVirtualView(width, heightMeasureSpec);
int height = (int)measure.Height;
var size = _viewHandler.VirtualView.Measure(width, double.PositiveInfinity);
// This way can't measure correctly.
//var measure = _viewHandler.MeasureVirtualView(width, heightMeasureSpec);
int height = (int)Context.ToPixels(size.Height);

SetMeasuredDimension(width, height);
_heightCache = height;
Expand Down

0 comments on commit 1dd6a66

Please sign in to comment.