Better error handling for image loading errors on iOS/Android (#849)
authorE.Z. Hart <hartez@users.noreply.github.com>
Tue, 25 Apr 2017 18:16:25 +0000 (12:16 -0600)
committerRui Marinho <me@ruimarinho.net>
Tue, 25 Apr 2017 18:16:25 +0000 (19:16 +0100)
commitcdc405512844671bc3b2c8bd28f583036e5530a2
tree881d68b4a26eecbbc77e76b86b3f322cd41b3e3d
parent9631ec2d8bbac8b837955af238f322c1023af097
Better error handling for image loading errors on iOS/Android (#849)

* First run at removing async void image update methods

Consistent error logging and IsLoading on Android,iOS,UWP

Move error logging into image handlers for better messages

Add demo of custom ImageRenderer error handling

Update docs

Make the test smaller so the results don't get pushed offscreen

Fix namespace error

* Update error handling for fast image renderer

* Update 37625 test to use image we control

* Add java disposed check to avoid ObjectDisposedException in async operations

* Add disposed checks to legacy renderer; null check element before SetIsLoading

* Check disposed on GetDesiredSize for fast renderer
Use local disposed member where possible for disposed check

* Check for disposal after async handlers in iOS

* Add disposal checks after async methods in Windows

* Reset linker settings on project; reduce redundant casts in ImageViewExtensions
29 files changed:
Xamarin.Forms.ControlGallery.Android/BrokenImageSourceHandler.cs [new file with mode: 0644]
Xamarin.Forms.ControlGallery.Android/Properties/AssemblyInfo.cs
Xamarin.Forms.ControlGallery.Android/Resources/drawable/invalidimage.jpg [new file with mode: 0644]
Xamarin.Forms.ControlGallery.Android/Xamarin.Forms.ControlGallery.Android.csproj
Xamarin.Forms.ControlGallery.Android/_38989CustomRenderer.cs
Xamarin.Forms.ControlGallery.Windows/BrokenImageSourceHandler.cs
Xamarin.Forms.ControlGallery.iOS/BrokenImageSourceHandler.cs [new file with mode: 0644]
Xamarin.Forms.ControlGallery.iOS/Properties/AssemblyInfo.cs
Xamarin.Forms.ControlGallery.iOS/Resources/invalidimage.jpg [new file with mode: 0644]
Xamarin.Forms.ControlGallery.iOS/Xamarin.Forms.ControlGallery.iOS.csproj
Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla37625.cs
Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla51173.cs [new file with mode: 0644]
Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/CustomImageRendererErrorHandling.cs [new file with mode: 0644]
Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/ImageLoadingErrorHandling.cs [deleted file]
Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems
Xamarin.Forms.Core/FileImageSource.cs
Xamarin.Forms.Core/UriImageSource.cs
Xamarin.Forms.Platform.Android/Extensions/ImageViewExtensions.cs
Xamarin.Forms.Platform.Android/Extensions/JavaObjectExtensions.cs [new file with mode: 0644]
Xamarin.Forms.Platform.Android/FastRenderers/ImageRenderer.cs
Xamarin.Forms.Platform.Android/Renderers/FileImageSourceHandler.cs
Xamarin.Forms.Platform.Android/Renderers/ImageLoaderSourceHandler.cs
Xamarin.Forms.Platform.Android/Renderers/ImageRenderer.cs
Xamarin.Forms.Platform.Android/Renderers/StreamImagesourceHandler.cs
Xamarin.Forms.Platform.Android/Xamarin.Forms.Platform.Android.csproj
Xamarin.Forms.Platform.WinRT/ImageRenderer.cs
Xamarin.Forms.Platform.iOS/Renderers/ImageRenderer.cs
docs/Xamarin.Forms.Core/Xamarin.Forms/FileImageSource.xml
docs/Xamarin.Forms.Core/Xamarin.Forms/UriImageSource.xml