From 6f80687d569d62673093766e5e9b9892eadb3229 Mon Sep 17 00:00:00 2001 From: maonaoda Date: Wed, 19 Jun 2024 16:17:52 +0900 Subject: [PATCH] add mapper for IsSwipePagingEnabledProperty on Android Make MapUpdateOffscreenPageLimit internal remove unused PublicApi --- src/Controls/src/Core/Platform/Android/TabbedPageManager.cs | 2 +- src/Controls/src/Core/TabbedPage/TabbedPage.Android.cs | 5 +++++ src/Controls/src/Core/TabbedPage/TabbedPage.Mapper.cs | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Controls/src/Core/Platform/Android/TabbedPageManager.cs b/src/Controls/src/Core/Platform/Android/TabbedPageManager.cs index 4fd95c9a6e81..2a34a33a9f57 100644 --- a/src/Controls/src/Core/Platform/Android/TabbedPageManager.cs +++ b/src/Controls/src/Core/Platform/Android/TabbedPageManager.cs @@ -470,7 +470,7 @@ void UpdateIgnoreContainerAreas() child.IgnoresContainerArea = child is NavigationPage; } - void UpdateOffscreenPageLimit() + internal void UpdateOffscreenPageLimit() { _viewPager.OffscreenPageLimit = Element.OnThisPlatform().OffscreenPageLimit(); } diff --git a/src/Controls/src/Core/TabbedPage/TabbedPage.Android.cs b/src/Controls/src/Core/TabbedPage/TabbedPage.Android.cs index ea6322fb04e7..3bfffbd87073 100644 --- a/src/Controls/src/Core/TabbedPage/TabbedPage.Android.cs +++ b/src/Controls/src/Core/TabbedPage/TabbedPage.Android.cs @@ -94,6 +94,11 @@ internal static void MapCurrentPage(ITabbedViewHandler handler, TabbedPage view) view._tabbedPageManager?.ScrollToCurrentPage(); } + internal static void MapUpdateOffscreenPageLimit(ITabbedViewHandler handler, TabbedPage view) + { + view._tabbedPageManager?.UpdateOffscreenPageLimit(); + } + public static void MapIsSwipePagingEnabled(ITabbedViewHandler handler, TabbedPage view) { view._tabbedPageManager?.UpdateSwipePaging(); diff --git a/src/Controls/src/Core/TabbedPage/TabbedPage.Mapper.cs b/src/Controls/src/Core/TabbedPage/TabbedPage.Mapper.cs index 8dc05d087a72..345dd0059fd3 100644 --- a/src/Controls/src/Core/TabbedPage/TabbedPage.Mapper.cs +++ b/src/Controls/src/Core/TabbedPage/TabbedPage.Mapper.cs @@ -23,6 +23,7 @@ public partial class TabbedPage TabbedViewHandler.Mapper.ReplaceMapping(nameof(MultiPage.SelectedItem), MapSelectedItem); TabbedViewHandler.Mapper.ReplaceMapping(nameof(CurrentPage), MapCurrentPage); #if ANDROID + TabbedViewHandler.Mapper.ReplaceMapping(PlatformConfiguration.AndroidSpecific.TabbedPage.OffscreenPageLimitProperty.PropertyName, MapUpdateOffscreenPageLimit); TabbedViewHandler.Mapper.ReplaceMapping(PlatformConfiguration.AndroidSpecific.TabbedPage.IsSwipePagingEnabledProperty.PropertyName, MapIsSwipePagingEnabled); #endif