Skip to content

[Xamarin.Forms] CollectionView doesnt scroll to item completly in carousel layout #76

@meierhoeferjannis

Description

@meierhoeferjannis

Platform (please complete the following information):

  • OS: Android
  • Device: AndroidEmulator
  • Sdk vervion: Android Sdk 30
  • Xamarin.Forms: [5.0.0.2515]

Describe the bug
CollectionView doesnt scroll to an item completly in carousel layout, instead two items are half visible as you can see in the screenshot.
It seems like the SnapStyle Center causes this issue.

To Reproduce
I created a view and viewmodel, where in the viewmodel the currentindex of the CollectionView is set. When the view appears it seems like the collection view doesnt scroll but because of the snap style center the correct item is not entirely displayed. Instead the collection view is kind a stucked between two items.

I tried the same with a collectionview with horizontal layout and snap style start, and the scrolling just worked perfectly. So i assume the problem is the snap style center, which is mandatory for carousel layout at the moment.

Screenshots (if applicable)

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions