zhenweied09 / ColorPickers

Xamarin.Forms ColorPicker Demo Based On SkiaSharp
Other
6 stars 2 forks source link

No issue #1

Open dannykhreet opened 5 years ago

dannykhreet commented 5 years ago

Could you tell me how you fix the problem on the original color picker your question was here https://github.com/xamarin/Xamarin.Forms/issues/2199

about

[Android] System.ObjectDisposedException: Cannot access a disposed object. Object name: 'Xamarin.Forms.Platform.Android.Platform+DefaultRenderer'

thanks

zhenweied09 commented 5 years ago

Hi,

If I remember correctly, I just put a try-catch around the code and simply ignore it.

       try
        {
            if (viewDictionary.ContainsKey(view))
            {
                viewDictionary.Remove(view);
                view.Touch -= OnTouch;
            }
        }
        catch (Exception ex)
        {
            Console.WriteLine(ex);
        }

Otherwise, try to update to the latest package version or create a new project then move your source files new project.

Hope these could help...