Bug 45241 - ListView with few items has empty space below it
Summary: ListView with few items has empty space below it
Status: RESOLVED ANSWERED
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 2.3.2
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2016-10-10 16:49 UTC by Jimmy [MSFT]
Modified: 2017-01-03 21:44 UTC (History)
3 users (show)

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


Attachments
repro solution (268.68 KB, application/zip)
2016-10-10 16:49 UTC, Jimmy [MSFT]
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 ANSWERED

Description Jimmy [MSFT] 2016-10-10 16:49:02 UTC
Created attachment 17958 [details]
repro solution

### Overview
When a ListView is in a StackLayout which is contained in a ScrollView, the ListView appears to have a default height. This results in a large empty area between the elements below it if there are not enough list items:

> https://www.dropbox.com/s/mdhpkhm8k1n6dcq/LVSpacingIssue.png?dl=0


### Steps to Reproduce
1. Run any of the platform projects in the attached repro solution


### Expected Results
There is no empty space in the ListView when there are few list items.


### Testing Info
Tested with Forms 2.3.2
Comment 2 adrianknight89 2016-10-10 19:07:50 UTC
I remember Jason telling not to nest scrollview and listview inside each other. You should probably revise your design unless you have a strong reason to do scrollview -> stacklayout -> listview.
Comment 3 Paul DiPietro [MSFT] 2017-01-03 21:44:44 UTC
Users should not nest scrollable views.