diff options
author | Adrian Knight <adrianknight89@outlook.com> | 2016-11-27 14:17:24 -0600 |
---|---|---|
committer | Rui Marinho <me@ruimarinho.net> | 2017-02-22 11:30:19 +0000 |
commit | 31eada25bd1fe732c0970a276f1f4fc0324b02c1 (patch) | |
tree | cde2fbf769831beed9a963049def7334a646cb37 /Xamarin.Forms.Platform.Android/Cells | |
parent | 4ba2f0999e581340dc4e577db56a9a4c8f670c4c (diff) | |
download | xamarin-forms-31eada25bd1fe732c0970a276f1f4fc0324b02c1.tar.gz xamarin-forms-31eada25bd1fe732c0970a276f1f4fc0324b02c1.tar.bz2 xamarin-forms-31eada25bd1fe732c0970a276f1f4fc0324b02c1.zip |
add support for view cells
Diffstat (limited to 'Xamarin.Forms.Platform.Android/Cells')
-rw-r--r-- | Xamarin.Forms.Platform.Android/Cells/BaseCellView.cs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Xamarin.Forms.Platform.Android/Cells/BaseCellView.cs b/Xamarin.Forms.Platform.Android/Cells/BaseCellView.cs index c4d10cc4..b14a585a 100644 --- a/Xamarin.Forms.Platform.Android/Cells/BaseCellView.cs +++ b/Xamarin.Forms.Platform.Android/Cells/BaseCellView.cs @@ -193,7 +193,6 @@ namespace Xamarin.Forms.Platform.Android _imageView.SetImageResource(global::Android.Resource.Color.Transparent); Bitmap bitmap = null; - IImageSourceHandler handler; if (source != null && (handler = Registrar.Registered.GetHandler<IImageSourceHandler>(source.GetType())) != null) @@ -211,9 +210,12 @@ namespace Xamarin.Forms.Platform.Android } } - _imageView.SetImageBitmap(bitmap); - if (bitmap != null) - bitmap.Dispose(); + if (bitmap == null && source is FileImageSource) + _imageView.SetImageResource(ResourceManager.GetDrawableByName(((FileImageSource)source).File)); + else + _imageView.SetImageBitmap(bitmap); + + bitmap?.Dispose(); } } }
\ No newline at end of file |