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