diff options
-rw-r--r-- | Xamarin.Forms.Platform.Android/ResourceManager.cs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Xamarin.Forms.Platform.Android/ResourceManager.cs b/Xamarin.Forms.Platform.Android/ResourceManager.cs index 402e52be..f09f9978 100644 --- a/Xamarin.Forms.Platform.Android/ResourceManager.cs +++ b/Xamarin.Forms.Platform.Android/ResourceManager.cs @@ -24,6 +24,11 @@ namespace Xamarin.Forms.Platform.Android if(drawable == null) { var bitmap = GetBitmap(resource, file) ?? BitmapFactory.DecodeFile(file); + if (bitmap == null) + { + var source = Registrar.Registered.GetHandler<IImageSourceHandler>(fileImageSource.GetType()); + bitmap = source.LoadImageAsync(fileImageSource, Forms.Context).GetAwaiter().GetResult(); + } if (bitmap != null) drawable = new BitmapDrawable(resource, bitmap); } |