This repository has been archived by the owner on May 1, 2024. It is now read-only.
[Bug] CarouselView should not animate an initial Position on Android #11081
Labels
a/carouselview
e/2 🕑
2
in-progress
This issue has an associated pull request that may resolve it!
t/bug 🐛
Projects
Milestone
Description
On Android, setting Position of a CarouselView in XAML, or in a page constructor in C#, causes it to be animated to that position. This does not occur on iOS.
If I'm reading the code correctly, line 305 in UpdateInitialPosition() in the Android CarouselViewRenderer.cs [Android] should change from
Carousel.ScrollTo(_oldPosition, position: Xamarin.Forms.ScrollToPosition.Center, animate: Carousel.AnimatePositionChanges)
Carousel.ScrollTo(_oldPosition, position: Xamarin.Forms.ScrollToPosition.Center, animate: false)
Expected Behavior
CarouselView should be initialized to show the assigned position without animation.
Actual Behavior
CarouselView cycles through all prior positions before reaching the initial position.
Basic Information
Reproduction Link
CarouselBug.zip
Workaround
None
The text was updated successfully, but these errors were encountered: