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 (show other bugs)
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)

See Also:
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

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.

Note You need to log in before you can comment on or make changes to this bug.