Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

Disable animation scrolling to initial position in CarouselView #11173

Merged
merged 1 commit into from
Sep 17, 2020

Conversation

jsuarezruiz
Copy link
Contributor

@jsuarezruiz jsuarezruiz commented Jun 23, 2020

Description of Change

Disable animation scrolling to initial position in CarouselView. With a high number of items, the time to complete the animation is noticeable.

Issues Resolved

API Changes

Added AnimateInitialPosition property to CarouselView.

Platforms Affected

  • Core/XAML (all platforms)
  • iOS
  • Android
  • UWP

Behavioral/Visual Changes

None

Before/After Screenshots

Not applicable

Testing Procedure

Launch Core Gallery and navigate to the issue 11081. If the selected Item is the Item 2, directly without animations, the test has passed.

PR Checklist

  • Targets the correct branch
  • Tests are passing (or failures are unrelated)

@rmarinho
Copy link
Member

rmarinho commented Jun 23, 2020

Why don't you just use AnimatePositionChanges = false ? What if you want the animation on load?

@samhouts samhouts added this to In Review in 4.7.0 Jun 23, 2020
@jsuarezruiz jsuarezruiz added the DO-NOT-MERGE-!!! 🛑 This is in progress and needs to be updated before it can be merged. label Jun 23, 2020
@samhouts samhouts added the Core label Jun 24, 2020
@jsuarezruiz jsuarezruiz removed the DO-NOT-MERGE-!!! 🛑 This is in progress and needs to be updated before it can be merged. label Jun 24, 2020
@jsuarezruiz
Copy link
Contributor Author

jsuarezruiz commented Jun 24, 2020

Added AnimateInitialPosition property (is not a BindableProperty) to allow in a simple way to manage if the initial position is animated or not. by default, the initial position is not animated.

@samhouts samhouts added the API-change Heads-up to reviewers that this PR may contain an API change label Jul 8, 2020
@samhouts samhouts changed the base branch from 4.7.0 to 4.8.0 July 8, 2020 17:56
@samhouts samhouts removed this from In Review in 4.7.0 Jul 8, 2020
@samhouts samhouts added this to In Review in CollectionView Jul 13, 2020
@samhouts samhouts added this to In Review in CarouselView Jul 13, 2020
@samhouts samhouts changed the base branch from 4.8.0 to main July 30, 2020 01:11
@samhouts samhouts added this to In Review in vCurrent (4.8.0) Jul 30, 2020
@samhouts samhouts added this to In Review in .NET MAUI Backlog Jul 30, 2020
@samhouts samhouts removed this from In Review in vCurrent (4.8.0) Jul 30, 2020
@samhouts samhouts added the retarget-branch-required PR or associated issues target a milestone. Please target this PR to the matching branch. label Aug 4, 2020
@samhouts samhouts added this to the 5.0.0 milestone Aug 4, 2020
@samhouts samhouts removed this from In Review in .NET MAUI Backlog Aug 4, 2020
@samhouts samhouts added this to In Review in vNext+1 (5.0.0) Aug 11, 2020
@jsuarezruiz jsuarezruiz changed the base branch from main to 5.0.0 September 17, 2020 13:56
@jsuarezruiz jsuarezruiz removed the retarget-branch-required PR or associated issues target a milestone. Please target this PR to the matching branch. label Sep 17, 2020
@jsuarezruiz
Copy link
Contributor Author

Retarget to 5.0.0

@jsuarezruiz
Copy link
Contributor Author

@rmarinho Previously, a new bool property was added to the CarouselView to manage if the initial position was animated or not. However, CarouselView has changed a lot and by default the position is set without animation. So this PR only has an example to validate the issue.

@samhouts samhouts added the retarget-branch-required PR or associated issues target a milestone. Please target this PR to the matching branch. label Sep 17, 2020
@rmarinho rmarinho merged commit 8a13756 into 5.0.0 Sep 17, 2020
CollectionView automation moved this from In Review to Done Sep 17, 2020
CarouselView automation moved this from In Review to Done Sep 17, 2020
vNext+1 (5.0.0) automation moved this from In Review to Done Sep 17, 2020
@rmarinho rmarinho deleted the fix-11081 branch September 17, 2020 22:57
@samhouts samhouts added this to Done in Sprint 176 Sep 18, 2020
@samhouts samhouts removed this from Done in CollectionView Nov 3, 2020
@samhouts samhouts removed this from Done in CarouselView Nov 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a/carouselview a/collectionview API-change Heads-up to reviewers that this PR may contain an API change Core p/Android p/iOS 🍎 p/UWP retarget-branch-required PR or associated issues target a milestone. Please target this PR to the matching branch. t/bug 🐛
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

[Bug] CarouselView should not animate an initial Position on Android
4 participants