Bug 23463 - Button fails to scroll with rest of Scrollview
Summary: Button fails to scroll with rest of Scrollview
Status: RESOLVED INVALID
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 1.2.2
Hardware: PC Mac OS
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2014-09-29 15:30 UTC by Allie Miller
Modified: 2014-09-30 19:12 UTC (History)
5 users (show)

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


Attachments
sample relative (2.76 KB, text/plain)
2014-09-29 16:38 UTC, Andrew
Details


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:
Status:
RESOLVED INVALID

Description Allie Miller 2014-09-29 15:30:31 UTC
*Overview*
The button in a ScrollView remains fixed instead of scrolling with the ScrollView.

*Steps to Reproduce*
1) Deploy the TestScrollView project to Android emulator or device.
2) Attempt to scroll the view.

*Expected Result*
Button scrolls with the rest of the view.

*Actual Result*
Button remain fixed.

*Additional Information*
N/A

*Versioning Information*
Xamarin.Forms 1.2.2.6243

=== Xamarin Studio ===

Version 5.4 (build 240)
Installation UUID: cc8e706e-bb41-4849-b4fb-f85f1eb45202
Runtime:
Microsoft .NET 4.0.30319.18444
GTK+ 2.24.22 (MS-Windows theme)
GTK# 2.12.26

=== Xamarin.Android ===

Version: 4.16.0 (Enterprise Edition)
Android SDK: D:\DEV\SDK\Andriod\adt-bundle-windows-x86-20140321\sdk
Supported Android versions:
2.1 (API level 7)
2.2 (API level 8)
2.3 (API level 10)
3.0 (API level 11)
3.1 (API level 12)
4.0 (API level 14)
4.0.3 (API level 15)
4.1 (API level 16)
4.2 (API level 17)
4.3 (API level 18)
4.4 (API level 19)
4.4.87 (API level 20)
4.5 (API level 21)
Java SDK: C:\Program Files (x86)\Java\jdk1.6.0_39
java version "1.6.0_39"
Java(TM) SE Runtime Environment (build 1.6.0_39-b04)
Java HotSpot(TM) Client VM (build 20.14-b01, mixed mode, sharing)

=== Build Information ===

Release ID: 504000240
Git revision: 01786bc67c7024ec33d327ed27e4416d7a846f4e
Build date: 2014-09-17 11:05:20-04
Xamarin addins: 7cd7dfcd6b7b7b53281508954ec080f1cd153ad3

=== Operating System ===

Windows 6.1.7601.65536 (64-bit)
Comment 2 Andrew 2014-09-29 16:38:04 UTC
got it working with a relative layout, BUT if you comment out line 103 is fails.
Comment 3 Andrew 2014-09-29 16:38:39 UTC
Created attachment 8240 [details]
sample relative
Comment 4 Andrew 2014-09-29 16:39:27 UTC
sample relative: (attachment uploaded @ 16:38:39)

It works with a relative layout, but I do not understand why.

If I comment out line 103, the listView HeightRequested it fails.  But, if I do a listView Height calculation it works.

Comment out line 103:  fails  ?
Comment 5 Rajneesh Kumar 2014-09-30 04:31:17 UTC
I have checked this issue and able to reproduce the issue described in bug description. To reproduce this issue I have followed the sample application and steps provided in bug description.

Steps I have followed:

1. Open attached sample application in XS
2. Deploy the application on emulator
3. Attempt to scroll the ScrollView, items will scroll but
4. Observe that button in a ScrollView remains fixed instead of scrolling with the ScrollView.

Screencast: http://www.screencast.com/t/dkBmngGyM

Environment Info:

=== Xamarin Studio ===

Version 5.4 (build 240)
Installation UUID: a7e29e93-6348-4126-9ebc-b2777c96a552
Runtime:
	Microsoft .NET 4.0.30319.18408
	GTK+ 2.24.22 (MS-Windows theme)
	GTK# 2.12.26

=== Xamarin.Android ===

Version: 4.16.0 (Trial Edition)
Android SDK: E:\android-sdk
	Supported Android versions:
		2.1    (API level 7)
		2.2    (API level 8)
		2.3    (API level 10)
		3.1    (API level 12)
		4.0    (API level 14)
		4.0.3  (API level 15)
		4.2    (API level 17)
		4.3    (API level 18)
		4.4    (API level 19)
		4.4.87 (API level 20)
		4.5    (API level 21)
Java SDK: C:\Program Files (x86)\Java\jdk1.6.0_39
java version "1.6.0_39"
Java(TM) SE Runtime Environment (build 1.6.0_39-b04)
Java HotSpot(TM) Client VM (build 20.14-b01, mixed mode)

=== Build Information ===

Release ID: 504000240
Git revision: 01786bc67c7024ec33d327ed27e4416d7a846f4e
Build date: 2014-09-17 11:05:20-04
Xamarin addins: 7cd7dfcd6b7b7b53281508954ec080f1cd153ad3

=== Operating System ===

Windows 6.2.9200.0 (64-bit)
Comment 6 Rajneesh Kumar 2014-09-30 04:50:55 UTC
As per comment 2 

I have checked this issue again and able to reproduce the reported behavior.

Steps to reproduce:

1. Add an XAMl page named "WorkingScrollViewPage" to the application (Provided in Bug description)  
2. Copy code provided in Comment 3 attachment
3. Paste it into WorkingScrollViewPage.xaml.cs
4. Call WorkingScrollViewPage page in app.cs
5. Run the application and observe that button is scrolling with scrollview
6. Now Comment on line no 103 in WorkingScrollViewPage. cs page
7. Run the application again, scroll the scrollview
8. Observe that the button in a ScrollView remains fixed.

Screencast: http://www.screencast.com/t/pdx9lPCl
Comment 7 Andrew 2014-09-30 10:48:58 UTC
the "button" is in the sample code, but it happens with Labels as well.  probably with the "other" controls as well.  I have tested Labels, StackLayouts and Buttons and all remain fixed.
Comment 8 Jason Smith [MSFT] 2014-09-30 11:15:30 UTC
Yeah so this is not a great idea for a layout. The behavior of putting a ListView inside a ScrollView is currently not defined at all in Xamarin.Forms.

Essentially the iOS behavior has completely disabled all visualization, newing up all cells at once. This is obviously not ideal. The Android behavior maintains the virtualization by fitting the ListView into the ScrollView so the scrollview isn;t scrolling but the ListView is.

The negotiation between the two scrolling regions is not strongly defined in the Xamarin.Forms API and in the future the Android style you see here will become the norm. It is the better performing of the two options and the only one that will really work cross platform.
Comment 9 Andrew 2014-09-30 13:00:28 UTC
Is there a way to keep the top part of the page fixed and have the bottom part scroll or is it a scrollview for all or none behavior?
Comment 10 Jason Smith [MSFT] 2014-09-30 19:12:32 UTC
the behavior you want is to use a header in the ListView and simply not use the scrollview at all.