Example #1
0
        protected override void OnDetached()
        {
            if (_viewTreeObserver != null)
            {
                if (_viewTreeObserver.IsAlive)
                {
                    _viewTreeObserver.GlobalLayout -= OnGlobalLayout;
                }
                else
                {
                    _viewTreeObserver.Dispose();
                }
            }

            if (Control?.Animation is Android.Views.Animations.Animation)
            {
                Control.Animation.Cancel();
                Control.Animation = null;
            }
        }