diff options
Diffstat (limited to 'Xamarin.Forms.Platform.Android/AppCompat/PickerRenderer.cs')
-rw-r--r-- | Xamarin.Forms.Platform.Android/AppCompat/PickerRenderer.cs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Xamarin.Forms.Platform.Android/AppCompat/PickerRenderer.cs b/Xamarin.Forms.Platform.Android/AppCompat/PickerRenderer.cs index 6650d9e6..9587d0ad 100644 --- a/Xamarin.Forms.Platform.Android/AppCompat/PickerRenderer.cs +++ b/Xamarin.Forms.Platform.Android/AppCompat/PickerRenderer.cs @@ -6,6 +6,7 @@ using Android.Content.Res; using Android.Text; using Android.Widget; using Object = Java.Lang.Object; +using System.Collections.Specialized; namespace Xamarin.Forms.Platform.Android.AppCompat { @@ -31,7 +32,7 @@ namespace Xamarin.Forms.Platform.Android.AppCompat { _disposed = true; - ((ObservableList<string>)Element.Items).CollectionChanged -= RowsCollectionChanged; + ((INotifyCollectionChanged)Element.Items).CollectionChanged -= RowsCollectionChanged; } base.Dispose(disposing); @@ -40,11 +41,11 @@ namespace Xamarin.Forms.Platform.Android.AppCompat protected override void OnElementChanged(ElementChangedEventArgs<Picker> e) { if (e.OldElement != null) - ((ObservableList<string>)e.OldElement.Items).CollectionChanged -= RowsCollectionChanged; + ((INotifyCollectionChanged)e.OldElement.Items).CollectionChanged -= RowsCollectionChanged; if (e.NewElement != null) { - ((ObservableList<string>)e.NewElement.Items).CollectionChanged += RowsCollectionChanged; + ((INotifyCollectionChanged)e.NewElement.Items).CollectionChanged += RowsCollectionChanged; if (Control == null) { EditText textField = CreateNativeControl(); |