Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
When using a ListView with a DataTemplateSelector and RecycleElement as the caching strategy, with two different DataTemplates being used, the ViewCells sometimes become unresponsive. The ListView can be scrolled, but taps on the ViewCells are ignored.
I have only seen this happen on two devices, one Android and one iOS. I have never seen it on any other devices (UWP, WinRT, Android or iOS). Even on the Android device where it occurs, it does not occur every time.
If I change RecycleElement to RetainElement, the problem does not occur.
If I only have one DataTemplate in use, even with RecycleElement, the problem does not occur.
The problem occurs when RecycleElement is used in conjunction with a DataTemplateSelector and more than one DataTemplate type. It seems to be timing related, so I suspect an issue around async/Tasks in the DataTemplateSelector handling within ListView.
It seems to be what others have talked about here:
And which I raised (before I saw that thread) here:
As mentioned previously, the problem does not show up every time even on the devices where it does happen.
My suspicion (other than it being timing related, around async/Tasks in the DataTemplateSelector/RecycleElement handling within ListView) is as follows:
The problem shows up when I have more than one DataTemplate used within the ListView.
The first DataTemplate I use sets IsEnabled=false on the ViewCell.
The other DataTemplates set IsEnabled=true on ViewCells.
I think that the RecycleElement handling is not resetting IsEnabled correctly when switching from one DataTemplate to another.
Our test Xamarin.Forms.Controls\GalleryPages\ListViewDemoPage.cs uses RecycleElement and multiple DataTemplates so should be able to repo. However, after playing around with my device Nexus 5 and emulators I was unable to reproduce. Don't doubt it's happening but will need more investigation.
John, would you be willing to attach a small reproduction just so we're sure we're using an app that someone has observed the issue while using? Also, could you tell us which devices you see the issue on? We have a test cloud so there's a good chance we have the devices.
Because we have not received a reply to our request for more information we are closing this issue. If you are still encountering this issue, please reopen the ticket with the requested information. Thanks!