diff options
author | Samantha Houts <samantha@teamredwall.com> | 2016-07-01 13:51:38 -0700 |
---|---|---|
committer | Rui Marinho <me@ruimarinho.net> | 2016-07-01 21:51:38 +0100 |
commit | eb84f968f2fac47c375724465854e58c85e45bee (patch) | |
tree | 64d9ded58234602c4bdea1e706db6e0f9ba90c3c /Xamarin.Forms.Platform.Android | |
parent | 128796e6d0c6bc4c48ba3b6de4ca97a33d698724 (diff) | |
download | xamarin-forms-eb84f968f2fac47c375724465854e58c85e45bee.tar.gz xamarin-forms-eb84f968f2fac47c375724465854e58c85e45bee.tar.bz2 xamarin-forms-eb84f968f2fac47c375724465854e58c85e45bee.zip |
[All] Crash fixes for ListViews (#243)
* [Controls] Add repro for 42277
* [Android] No crash if GroupHeaderTemplate=null
* [Android] Fix DataTemplateSelector crash
* [Core] Expose ListProxy on TIL
* [iOS] Fix DataTemplateSelector crash
* [Win] Fix DataTemplateSelector crash
* [Docs] Update docs
* [Core] Implement ListProxy explicitly
Allows ListProxy property to stay internal.
* [Controls] Revert unnecessary change to shproj
Diffstat (limited to 'Xamarin.Forms.Platform.Android')
-rw-r--r-- | Xamarin.Forms.Platform.Android/Renderers/ListViewAdapter.cs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Xamarin.Forms.Platform.Android/Renderers/ListViewAdapter.cs b/Xamarin.Forms.Platform.Android/Renderers/ListViewAdapter.cs index 5ac214cd..2230d2b4 100644 --- a/Xamarin.Forms.Platform.Android/Renderers/ListViewAdapter.cs +++ b/Xamarin.Forms.Platform.Android/Renderers/ListViewAdapter.cs @@ -144,9 +144,9 @@ namespace Xamarin.Forms.Platform.Android { object item = null; if (_listView.IsGroupingEnabled) - item = ((ITemplatedItemsView<Cell>)TemplatedItemsView.TemplatedItems.GetGroup(group)).ListProxy[row]; + item = TemplatedItemsView.TemplatedItems.GetGroup(group).ListProxy[row]; else - item = ((ITemplatedItemsView<Cell>)TemplatedItemsView.TemplatedItems).ListProxy[position]; + item = TemplatedItemsView.TemplatedItems.ListProxy[position]; itemTemplate = selector.SelectTemplate(item, _listView); } int key; @@ -405,7 +405,7 @@ namespace Xamarin.Forms.Platform.Android { if (_listView.CachingStrategy == ListViewCachingStrategy.RecycleElement) { - var groupContent = _listView.TemplatedItems.GroupHeaderTemplate.CreateContent(group.ItemsSource, _listView) as Cell; + var groupContent = _listView.TemplatedItems.GroupHeaderTemplate?.CreateContent(group.ItemsSource, _listView) as Cell; if (groupContent != null) { groupContent.Parent = _listView; |