Bug 36101 - RelativeLayout child positioning issue on iOS
Summary: RelativeLayout child positioning issue on iOS
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 2.0.0
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2015-11-20 12:05 UTC by Alex Rainman
Modified: 2017-09-01 03:11 UTC (History)
5 users (show)

Tags: ac, relativelayout, layout, ios
Is this bug a regression?: ---
Last known good build:

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 Alex Rainman 2015-11-20 12:05:10 UTC
I have this XAML code:

<RelativeLayout x:Name="dLayout">
        <Image Source="Dashboard_Photo" x:Name="tImage"
            RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=1}"/>
        <AbsoluteLayout x:Name="gLayout" BackgroundColor="White"
		    RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=1}"
            RelativeLayout.YConstraint= "{ConstraintExpression Type=RelativeToView, ElementName=tImage, Property=Height, Factor=1}">
			    <OnPlatform x:TypeArguments="Thickness">
			        8, 8, 8, 16
		    <Grid AbsoluteLayout.LayoutBounds="0,0,0.74,1"
			      <RowDefinition Height="Auto" />
			      <RowDefinition Height="Auto" />
			      <ColumnDefinition Width="1*" />
			      <ColumnDefinition Width="1*" />
			    <Label Grid.Row="0" Grid.Column="0" Text="QUARTERLY GOAL" FontSize="14" HeightRequest="16"/>
			    <Label Grid.Row="0" Grid.Column="1" Text="8 of 20" FontSize="14" HeightRequest="16" XAlign="End"/>
                <ProgressBar Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" Progress=".8"/>
            RelativeLayout.YConstraint= "{ConstraintExpression Type=RelativeToView, ElementName=gLayout, Property=Height, Factor=1}">

In Android the ListView goes bellow the AbsoluteLayout. In iOS, it appears on top of everything occupying the whole screen. If i remove the AbsoluteLayout, then the ListView is positioned below the Image. No matter what it's, if i add something between the Image and ListView, in iOS the ListView doesn't get the coordinates and use the whole screen.

What i am missing? Is this a bug?

Comment 1 David Ortinau [MSFT] 2017-09-01 03:11:09 UTC
This appears to be fixed at least as of 2.4.0-pre2. The ListView is properly below the AbsoluteLayout content and doesn't take over the entire screen on iOS 10.3.