Bug 42202 - ListView has shown unwanted free space
Summary: ListView has shown unwanted free space
Status: RESOLVED FIXED
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 1.4.4
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2016-06-28 11:48 UTC by Faizal Saidali
Modified: 2016-06-30 15:56 UTC (History)
2 users (show)

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


Attachments
This is the result of above defined code. (1003.57 KB, video/quicktime)
2016-06-28 11:48 UTC, Faizal Saidali
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 FIXED

Description Faizal Saidali 2016-06-28 11:48:57 UTC
Created attachment 16508 [details]
This is the result of above defined code.

Dear team,
I have found an issue on ListView, unwanted free space on top and bottom side of all ListView in my project. In this case the ListView begins on the end of the mobile view.

And the worst thing is, this issue is not effect in all mobiles. This issue was found on HTC 820, Samsung Galaxy S6 edge etc...

I have shown below a example of my issue, its results also attached.

var listView = new ListView () {
	BackgroundColor = Color.Accent,
	SeparatorColor = Color.Black
};
listView.ItemsSource = new List<string> {
	"First Line",
	"Second Line",
	"Third Line",
	"Fourth Line",
	"Fifth Line",
	"Sixth Line",
	"Seventh Line",
	"Eighth Line",
	"Ninth Line",
	"Tenth Line",
	"Eleventh Line",
	"Twelfth Line"
};

listView.ItemTemplate = new DataTemplate (() => {

	var layout = new StackLayout () {
		BackgroundColor = Color.White,
		Padding = 10
	};

	var label = new Label ();
	label.SetBinding (Label.TextProperty, ".");
	layout.Children.Add (label);

	return new ViewCell {
		View = layout
	};
});

Content = listView;
Comment 1 Paul DiPietro [MSFT] 2016-06-30 15:56:49 UTC
I believe this was was was fixed a long time ago. Updating Forms should resolve it.