CollectionViewChallenge - Cloned Listen by Mockplus #37
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 reproduced Listen app by Mockplus using CollectionView and its new features such as scrolling events, GridItemLayout, SnapPoints etc. I created this mockup from scratch hence I'm not sure its ListView version exists but it's damn easy to create horizontal view with collection of items using CollectionView.
Screenshots
Original Mockup: (Reference: https://dribbble.com/shots/4002107-Listen)
My Mockup:
What went well?
CollectionView is easy to use and I found both's markup (ListView and CollectionView) can easily replace each other in XAML at any point. As I wanted to create horizontal scrolling view (similar to Carousel), I found CollectionView more suitable as it already contains GridItemLayout and its SnapPoint configuration is just cherry on the cake to display single item on the screen.
What didn't go well?
I ran into couple of difficulties and found below issues:
No ItemAppearing event similar to ListView (However ViewCell Appearing event can be a workaround) - I wanted to use this feature to animate the song lyrics and change the font color on appearing of text (similar to original mockup) but had to use Xamarin Forms animation on label as a fallback.
ScrollToRequested event doesn't listen if CollectionView scrolled manually - I found this to be more of a bug/missing feature as scrolling (either manually or programatically) should listen by the same event as it doesn't matter from the end-user perspective. I wanted to use the same ScrollToRequested event to perform the operations with manual scroll as well what I'm doing with 'Next' button programatically.
SnapPointsAlignment - I tested with Android and found that first item has always slight off to the right even though I've mentioned it as SnapPointsAlignment="Center". If I hit 'Next' button (which further calls ScrollTo), it corrects its position.
How is the performance?
With the current mockup, I didn't find any issue with load time. However I will need to test by adding more songs to the collection. But I found issue with scrolling the collection view with SnapPoints enabled. It is kind of lagging and not a smooth user experience. Sometimes it even skips the item during scrolling (both programatically or manually).
Missing or Desired Things:
I would like CollectionView to have ItemAppearing, Scroll Change event to listen to manual scrolling, smooth scrolling with SnapPoints enabled for medium and large images (displaying one item on view).
Overall, Thanks and Kudos ❤ to all the Team Members behind implementation of CollectionView. It will definitely be the successor and enhanced version of ListView. 😎