Bug 44461 - ScrollToPosition.Center works differently on Android and iOS
Summary: ScrollToPosition.Center works differently on Android and iOS
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 2.3.2
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2016-09-18 02:52 UTC by adrianknight89
Modified: 2016-11-28 12:35 UTC (History)
3 users (show)

Tags: AC iOS
Is this bug a regression?: ---
Last known good build:

repro (207.69 KB, application/zip)
2016-09-18 02:52 UTC, adrianknight89

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description adrianknight89 2016-09-18 02:52:01 UTC
Created attachment 17567 [details]

I'm not sure if this is how iOS works, but on iOS, setting element position to Center while scrolling moves scrollview out of place if the element is placed before the center of the screen. Similarly, the same happens if the last element(s) are placed after the center of the screen.

In contrast, Android seems more intelligent and does NOT scroll when it doesn't need to.

Steps to reproduce:

- Click on the first button on Android (does not scroll)
- Click on the 3rd or 4th button depending on device screen resolution (scrolls to center)
- Test it on iOS. Behaves differently.
Comment 1 adrianknight89 2016-09-23 05:53:07 UTC
See https://github.com/xamarin/Xamarin.Forms/pull/371
Comment 2 Stephane Delcroix 2016-10-04 08:34:09 UTC
Hi Adrian,

there's indeed a mismatch between android and iOS, but I can't decide which style I like most :P

thanks also for the PR, it fixes the issue.
Comment 3 Stephane Delcroix 2016-10-11 19:07:32 UTC
should be fixed in 2.3.4-pre1
Comment 4 Parmendra Kumar 2016-11-28 12:35:29 UTC
I have checked this issue and observed that this issue has been fixed with 2.3.4-pre1.

Hence closing this issue.