Implement ListView and CollectionView comparison #28
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I decided to replicate a PoC Playstation Network trophy app that I wrote a while back as it is a good example of
ListViewusage.Screenshots
What went well?
Overall it was very straightforward to replicate the same page using a
CollectionViewinstead of aListView. As you can see from the screenshots, the way that the layouts are rendered appears identical.What didn't go well?
The only problem that I ran into was that I initially tried to reuse the
ViewCellthat I created for theListViewwith theCollectionView, reading through the documentation didn't seem to mention that you can't use aViewCellas the root element for theCollectionViewDataTemplate- I imagine you could get around this by using aContentViewas the root element in the layout though (I have not tried this though), this would then allow layouts to be written as reusable cells.How is the performance?
Running on an x86_64 Android 9.0 emulator everything was a little sluggish and juddery when scrolling, but that could just be the emulator. When running on a device both the
ListViewandCollectionViewwere both very smooth when scrolling with a small occasional judder.One thing that I did see with the
ListView, but not withCollectionView, was that when scrolling down then scrolling back up again some controls within theViewCellwould disappear or be resized so their content was not displayed properly - this only seemed to affect labels and is not something I have seen when using Xamarin.Forms 3.x.Missing or Desired Things:
I know some of these are either currently being worked on or are planned:
ViewCellas the item template.Swag Time!
Take a minute now or later and provide your info here: https://www.surveymonkey.com/r/WKBZCXX