Skip to content

A Carousel or Two#19

Open
irongut wants to merge 20 commits intopauldipietro:masterfrom
irongut:master
Open

A Carousel or Two#19
irongut wants to merge 20 commits intopauldipietro:masterfrom
irongut:master

Conversation

@irongut
Copy link

@irongut irongut commented Sep 21, 2019

Submission description

I used the challenge to experiment with a new UI for one of my published apps. (Android only)

GalNet News

Original CarouselView
Original-GalNet Carousel-GalNet
Tapping a list item opens another page showing the full article. The full article is visible in the CarouselView.

Fortify

Original CarouselView
Original-Fortify Carousel-Fortify
Uses tabs to show two lists of targets. Uses two CarouselViews to show the two lists of targets.

What went well

Initially I found the way CarouselView lays out the child views a bit confusing but after some experimentation it went well. So well that I created a second screen based on another part of the same app to experiment with multiple carousels.

I really like the options for customising how the items scroll.

What didn't go well

Adding to an ObservableCollection bound to a CarouselView from a thread caused an exception - Android.Util.AndroidRuntimeException: Only the original thread that created a view hierarchy can touch its views. Wrapping the add in Device.BeginInvokeOnMainThread() solved this problem. I don't have this issue when using a ListView in the original app.

On my Fortify page I wanted to have two items visible at a time but setting NumberOfSideItems="1" gives you three items on screen.

Updating from Forms 4.3-pre1 to 4.3-pre2 changed CarouselView.ItemsLayout. I needed to change ListItemsLayout to LinearItemsLayout to control how the items scroll. The docs have not been updated to reflect this change.

Missing or desired things

Optional position indicators and scroll buttons that can be customised in size, colour and shape.
The ability to have two items on screen at a time.

@irongut
Copy link
Author

irongut commented Sep 21, 2019

"What didn't go well" continued...

I forgot to mention I tried binding EmptyView to a string property on my ViewModel. My idea was to show "Loading..." while downloading data and a message if there was an error but the text I set never showed. In a real app I would have spent more time on this and used a view rather than a string for these purposes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant