[Android] Uniformize handler name (CollectionView) (#6720)
authorKevin Petit <kevin.petit@outlook.com>
Thu, 11 Jul 2019 01:34:26 +0000 (03:34 +0200)
committerSamantha Houts <samhouts@users.noreply.github.com>
Thu, 11 Jul 2019 01:34:26 +0000 (18:34 -0700)
* CollectionView - Uniformize handler name.

* Address naming feedback.

* Revert BOM.

Xamarin.Forms.Platform.Android/CollectionView/ItemsViewRenderer.cs
Xamarin.Forms.Platform.Android/CollectionView/SelectableItemsViewAdapter.cs

index 0a64cfb..4840a11 100644 (file)
@@ -299,7 +299,7 @@ namespace Xamarin.Forms.Platform.Android
                        // Keep track of the ItemsLayout's property changes
                        if (_layout != null)
                        {
-                               _layout.PropertyChanged += LayoutOnPropertyChanged;
+                               _layout.PropertyChanged += LayoutPropertyChanged;
                        }
 
                        // Listen for ScrollTo requests
@@ -316,7 +316,7 @@ namespace Xamarin.Forms.Platform.Android
                        // Stop listening for layout property changes
                        if (_layout != null)
                        {
-                               _layout.PropertyChanged -= LayoutOnPropertyChanged;
+                               _layout.PropertyChanged -= LayoutPropertyChanged;
                        }
 
                        // Stop listening for property changes
@@ -346,7 +346,7 @@ namespace Xamarin.Forms.Platform.Android
                        }
                }
 
-               protected virtual void LayoutOnPropertyChanged(object sender, PropertyChangedEventArgs propertyChanged)
+               protected virtual void LayoutPropertyChanged(object sender, PropertyChangedEventArgs propertyChanged)
                {
                        if (propertyChanged.Is(GridItemsLayout.SpanProperty))
                        {
index 1491cab..e66f5e1 100644 (file)
@@ -27,7 +27,7 @@ namespace Xamarin.Forms.Platform.Android
                        }
 
                        // Watch for clicks so the user can select the item held by this ViewHolder
-                       selectable.Clicked += SelectableOnClicked;
+                       selectable.Clicked += SelectableClicked;
 
                        // Keep track of the view holders here so we can clear the native selection
                        _currentViewHolders.Add(selectable);
@@ -41,7 +41,7 @@ namespace Xamarin.Forms.Platform.Android
                        if (holder is SelectableViewHolder selectable)
                        {
                                _currentViewHolders.Remove(selectable);
-                               selectable.Clicked -= SelectableOnClicked;
+                               selectable.Clicked -= SelectableClicked;
                                selectable.IsSelected = false;
                        }
 
@@ -120,7 +120,7 @@ namespace Xamarin.Forms.Platform.Android
                        return false;
                }
 
-               void SelectableOnClicked(object sender, int adapterPosition)
+               void SelectableClicked(object sender, int adapterPosition)
                {
                        UpdateFormsSelection(adapterPosition);
                }