[Android] set dialog to null when dismissed (#6031)
authorShane Neuville <shane94@hotmail.com>
Sat, 27 Apr 2019 19:18:08 +0000 (13:18 -0600)
committerSamantha Houts <samhouts@users.noreply.github.com>
Sat, 27 Apr 2019 19:18:08 +0000 (12:18 -0700)
fixes #5945

Xamarin.Forms.Platform.Android/Renderers/PickerRenderer.cs

index 60a6eb8..92bc534 100644 (file)
@@ -168,6 +168,8 @@ namespace Xamarin.Forms.Platform.Android
                        _dialog.DismissEvent += (sender, args) =>
                        {
                                ElementController?.SetValueFromRenderer(VisualElement.IsFocusedPropertyKey, false);
+                               _dialog?.Dispose();
+                               _dialog = null;
                        };
                        _dialog.Show();
                }