diff --git a/src/Controls/src/Core/Compatibility/Handlers/Shell/Android/ShellItemRenderer.cs b/src/Controls/src/Core/Compatibility/Handlers/Shell/Android/ShellItemRenderer.cs index d969e5691f27..e75fdf86a5ce 100644 --- a/src/Controls/src/Core/Compatibility/Handlers/Shell/Android/ShellItemRenderer.cs +++ b/src/Controls/src/Core/Compatibility/Handlers/Shell/Android/ShellItemRenderer.cs @@ -54,7 +54,6 @@ void IAppearanceObserver.OnAppearanceChanged(ShellAppearance appearance) IShellBottomNavViewAppearanceTracker _appearanceTracker; BottomNavigationViewTracker _bottomNavigationTracker; BottomSheetDialog _bottomSheetDialog; - bool _disposed; bool _menuSetup; ShellAppearance _shellAppearance; bool _appearanceSet; @@ -126,18 +125,6 @@ void Destroy() } - protected override void Dispose(bool disposing) - { - if (_disposed) - return; - - _disposed = true; - if (disposing) - Destroy(); - - base.Dispose(disposing); - } - // Use OnDestory become OnDestroyView may fire before events are completed. public override void OnDestroy() { diff --git a/src/Controls/src/Core/Compatibility/Handlers/Shell/Android/ShellItemRendererBase.cs b/src/Controls/src/Core/Compatibility/Handlers/Shell/Android/ShellItemRendererBase.cs index fac13a0b7936..e69d6bacd67d 100644 --- a/src/Controls/src/Core/Compatibility/Handlers/Shell/Android/ShellItemRendererBase.cs +++ b/src/Controls/src/Core/Compatibility/Handlers/Shell/Android/ShellItemRendererBase.cs @@ -33,7 +33,6 @@ ShellItem IShellItemRenderer.ShellItem IShellObservableFragment _currentFragment; ShellSection _shellSection; Page _displayedPage; - bool _disposed; protected ShellItemRendererBase(IShellContext shellContext) { @@ -114,19 +113,6 @@ public override void OnDestroy() Destroy(); } - protected override void Dispose(bool disposing) - { - if (_disposed) - return; - - _disposed = true; - - if (disposing) - Destroy(); - - base.Dispose(disposing); - } - protected abstract ViewGroup GetNavigationTarget(); protected virtual IShellObservableFragment GetOrCreateFragmentForTab(ShellSection shellSection) diff --git a/src/Controls/src/Core/Compatibility/Handlers/Shell/Android/ShellRenderer.cs b/src/Controls/src/Core/Compatibility/Handlers/Shell/Android/ShellRenderer.cs index 46ca471ab82d..6c0572bd564f 100644 --- a/src/Controls/src/Core/Compatibility/Handlers/Shell/Android/ShellRenderer.cs +++ b/src/Controls/src/Core/Compatibility/Handlers/Shell/Android/ShellRenderer.cs @@ -235,8 +235,7 @@ protected virtual void SwitchFragment(FragmentManager manager, AView targetView, // Don't force the commit if this is our first load if (previousView == null) { - transaction - .SetReorderingAllowedEx(true); + transaction.SetReorderingAllowedEx(true); } transaction.CommitAllowingStateLossEx(); @@ -245,7 +244,6 @@ void OnDestroyed(object sender, EventArgs args) { previousView.Destroyed -= OnDestroyed; - previousView.Dispose(); previousView = null; } diff --git a/src/Controls/src/Core/PublicAPI/net-android/PublicAPI.Shipped.txt b/src/Controls/src/Core/PublicAPI/net-android/PublicAPI.Shipped.txt index bc6e0632fd8e..ce68bc5c9d50 100644 --- a/src/Controls/src/Core/PublicAPI/net-android/PublicAPI.Shipped.txt +++ b/src/Controls/src/Core/PublicAPI/net-android/PublicAPI.Shipped.txt @@ -7648,10 +7648,8 @@ override Microsoft.Maui.Controls.Platform.Compatibility.ShellFlyoutTemplatedCont override Microsoft.Maui.Controls.Platform.Compatibility.ShellFlyoutTemplatedContentRenderer.HeaderContainer.Dispose(bool disposing) -> void override Microsoft.Maui.Controls.Platform.Compatibility.ShellFlyoutTemplatedContentRenderer.HeaderContainer.OnLayout(bool changed, int l, int t, int r, int b) -> void override Microsoft.Maui.Controls.Platform.Compatibility.ShellFlyoutTemplatedContentRenderer.HeaderContainer.OnMeasure(int widthMeasureSpec, int heightMeasureSpec) -> void -override Microsoft.Maui.Controls.Platform.Compatibility.ShellItemRenderer.Dispose(bool disposing) -> void override Microsoft.Maui.Controls.Platform.Compatibility.ShellItemRenderer.OnDestroy() -> void override Microsoft.Maui.Controls.Platform.Compatibility.ShellItemRenderer.OnShellSectionChanged() -> void -override Microsoft.Maui.Controls.Platform.Compatibility.ShellItemRendererBase.Dispose(bool disposing) -> void override Microsoft.Maui.Controls.Platform.Compatibility.ShellItemRendererBase.OnDestroy() -> void override Microsoft.Maui.Controls.Platform.Compatibility.ShellSearchView.Dispose(bool disposing) -> void override Microsoft.Maui.Controls.Platform.Compatibility.ShellSearchView.OnAttachedToWindow() -> void