From 3b9712aaf5d0e8932d1e30facc9ec842a43f6860 Mon Sep 17 00:00:00 2001 From: Samantha Houts Date: Wed, 18 Oct 2017 14:28:18 -0700 Subject: [Android] Prevent ObjectDisposedExceptions in ListViews with Header/FooterTemplates (#1155) * Update repro to include header/footers with bound props * [Android] Clear renderers of ListView header/footers And don't call `RemoveAllViews`, because that causes the ObjectDisposedExceptions. --- Xamarin.Forms.ControlGallery.Android/CustomRenderers.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Xamarin.Forms.ControlGallery.Android') diff --git a/Xamarin.Forms.ControlGallery.Android/CustomRenderers.cs b/Xamarin.Forms.ControlGallery.Android/CustomRenderers.cs index d8c5b9c0..21bcd740 100644 --- a/Xamarin.Forms.ControlGallery.Android/CustomRenderers.cs +++ b/Xamarin.Forms.ControlGallery.Android/CustomRenderers.cs @@ -31,7 +31,7 @@ using Xamarin.Forms.Controls.Issues; [assembly: ExportRenderer(typeof(Bugzilla42000._42000NumericEntryNoDecimal), typeof(EntryRendererNoDecimal))] [assembly: ExportRenderer(typeof(Bugzilla42000._42000NumericEntryNoNegative), typeof(EntryRendererNoNegative))] //[assembly: ExportRenderer(typeof(AndroidHelpText.HintLabel), typeof(HintLabel))] -[assembly: ExportRenderer(typeof(Bugzilla57910QuickCollectNavigationPage), typeof(QuickCollectNavigationPage))] +[assembly: ExportRenderer(typeof(QuickCollectNavigationPage), typeof(QuickCollectNavigationPageRenderer))] [assembly: ExportRenderer(typeof(Xamarin.Forms.Controls.Issues.NoFlashTestNavigationPage), typeof(Xamarin.Forms.ControlGallery.Android.NoFlashTestNavigationPage))] @@ -548,7 +548,8 @@ namespace Xamarin.Forms.ControlGallery.Android #endif } - public class QuickCollectNavigationPage +#pragma warning disable CS0618 // Leaving in old constructor so we can verify it works + public class QuickCollectNavigationPageRenderer #if FORMS_APPLICATION_ACTIVITY : Xamarin.Forms.Platform.Android.NavigationRenderer #else -- cgit v1.2.3