Skip to content

Commit

Permalink
Fix ScrollView content absolute position (#89)
Browse files Browse the repository at this point in the history
  • Loading branch information
myroot authored and rookiejava committed Aug 11, 2021
1 parent 15c09ea commit 859d3bc
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/Core/src/Handlers/ScrollView/ScrollViewHandler.Tizen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ protected override void ConnectHandler(ScrollView nativeView)
Canvas.LayoutUpdated += OnContentLayoutUpdated;
}

public override ElmSharp.Rect GetNativeContentGeometry()
{
return Canvas?.Geometry ?? NativeView.Geometry;
}

protected override void DisconnectHandler(ScrollView nativeView)
{
base.DisconnectHandler(nativeView);
Expand Down Expand Up @@ -84,6 +89,10 @@ public static void MapContent(ScrollViewHandler handler, IScrollView scrollView)

handler.Canvas.UnPackAll();
handler.Canvas.PackEnd(scrollView.Content.ToNative(handler.MauiContext));
if (scrollView.Content.Handler is INativeViewHandler thandler)
{
thandler?.SetParent(handler);
}
handler.UpdateContentSize();
}

Expand Down

0 comments on commit 859d3bc

Please sign in to comment.