Skip to content

Commit

Permalink
changed layout engine from virtual positioning to physical
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex-Dobrynin committed Jul 20, 2024
1 parent 4b96157 commit 292f76f
Show file tree
Hide file tree
Showing 7 changed files with 284 additions and 130 deletions.
13 changes: 12 additions & 1 deletion MPowerKit.VirtualizeListView/FixedRefreshView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,18 @@ public class FixedRefreshView : RefreshView
protected bool PrevEnabled { get; set; }
protected bool PrevPullRefreshEnabled { get; set; }

public FixedRefreshView()
{
#if ANDROID
this.SizeChanged += FixedRefreshView_SizeChanged;
#endif
}

private void FixedRefreshView_SizeChanged(object? sender, EventArgs e)
{
Content?.Layout(new Rect(0, 0, Width - Padding.HorizontalThickness, Height - Padding.VerticalThickness));
}

protected virtual void Refresh()
{
Refreshing?.Invoke(this, EventArgs.Empty);
Expand All @@ -30,7 +42,6 @@ protected virtual void UpdateEnabled()
{
PrevPullRefreshEnabled = IsPullToRefreshEnabled;
IsPullToRefreshEnabled = false;

PrevEnabled = IsEnabled;
IsEnabled = false;
}
Expand Down
Loading

0 comments on commit 292f76f

Please sign in to comment.