summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Platform.Android/AppCompat/ButtonRenderer.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Xamarin.Forms.Platform.Android/AppCompat/ButtonRenderer.cs')
-rw-r--r--Xamarin.Forms.Platform.Android/AppCompat/ButtonRenderer.cs7
1 files changed, 7 insertions, 0 deletions
diff --git a/Xamarin.Forms.Platform.Android/AppCompat/ButtonRenderer.cs b/Xamarin.Forms.Platform.Android/AppCompat/ButtonRenderer.cs
index 2d17586..4c33df8 100644
--- a/Xamarin.Forms.Platform.Android/AppCompat/ButtonRenderer.cs
+++ b/Xamarin.Forms.Platform.Android/AppCompat/ButtonRenderer.cs
@@ -71,6 +71,13 @@ namespace Xamarin.Forms.Platform.Android.AppCompat
if (disposing)
{
+ if (Control != null)
+ {
+ Control.SetOnClickListener(null);
+ Control.RemoveOnAttachStateChangeListener(this);
+ Control.Tag = null;
+ _textColorSwitcher = null;
+ }
}
base.Dispose(disposing);