Skip to content

Commit 84bdfbe

Browse files
kubafloalbyrock87
andcommitted
SwipeItemView won't render FontImageSource on first opening - fix
Co-Authored-By: Alberto Aldegheri <1423005+albyrock87@users.noreply.github.com>
1 parent a50d142 commit 84bdfbe

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

src/Core/src/Platform/Android/MauiSwipeView.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,16 @@ protected override void OnAttachedToWindow()
7676
_viewPagerParent = Control.Parent.GetParentOfType<SwipeViewPager>();
7777
}
7878

79+
protected override void OnLayout(bool changed, int left, int top, int right, int bottom)
80+
{
81+
base.OnLayout(changed, left, top, right, bottom);
82+
83+
if (_contentView is null || _actionView is null || GetNativeSwipeItems() is not {Count: > 0} swipeItems)
84+
return;
85+
86+
LayoutSwipeItems(swipeItems);
87+
}
88+
7989
public override bool OnTouchEvent(MotionEvent? e)
8090
{
8191
base.OnTouchEvent(e);

src/Core/src/PublicAPI/net-android/PublicAPI.Unshipped.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ override Microsoft.Maui.Handlers.HybridWebViewHandler.CreatePlatformView() -> An
5959
override Microsoft.Maui.Handlers.HybridWebViewHandler.DisconnectHandler(Android.Webkit.WebView! platformView) -> void
6060
override Microsoft.Maui.Platform.MauiHybridWebViewClient.Dispose(bool disposing) -> void
6161
override Microsoft.Maui.Platform.MauiHybridWebViewClient.ShouldInterceptRequest(Android.Webkit.WebView? view, Android.Webkit.IWebResourceRequest? request) -> Android.Webkit.WebResourceResponse?
62+
override Microsoft.Maui.Platform.MauiSwipeView.OnLayout(bool changed, int left, int top, int right, int bottom) -> void
6263
override Microsoft.Maui.Platform.MauiWebViewClient.OnRenderProcessGone(Android.Webkit.WebView? view, Android.Webkit.RenderProcessGoneDetail? detail) -> bool
6364
static Microsoft.Maui.ElementHandlerExtensions.GetRequiredService<T>(this Microsoft.Maui.IElementHandler! handler, System.Type! type) -> T
6465
static Microsoft.Maui.ElementHandlerExtensions.GetRequiredService<T>(this Microsoft.Maui.IElementHandler! handler) -> T

0 commit comments

Comments
 (0)