Bug 24404 - Rendering issue with Scrollviews adhering to layouts (Android)
Summary: Rendering issue with Scrollviews adhering to layouts (Android)
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 1.3.0
Hardware: All Mac OS
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2014-11-10 12:42 UTC by Andrew Way
Modified: 2015-01-12 17:38 UTC (History)
7 users (show)

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 Andrew Way 2014-11-10 12:42:38 UTC
Here is the XAML code of my main form (please copy and paste it to reproduce the bug):
<?xml version="1.0" encoding="UTF-8"?>
<ContentPage x:Name="pgMain"
    <Grid x:Name="LayoutRoot" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand">
        <RowDefinition Height="Auto"/>
        <RowDefinition Height="*"/>
        <ColumnDefinition Width="*" />
      <Grid x:Name="grdTop" Grid.Row="0" HeightRequest="70">
          <ColumnDefinition Width="*" />
          <ColumnDefinition Width="*" />
          <ColumnDefinition Width="*" />
        <Button x:Name="btn1" Text="BTN1" />
        <Button x:Name="btn2" Grid.Column="1" Text="BTN2" />
        <Button x:Name="btn3" Grid.Column="2" Text="BTN3" />
      <Grid x:Name="grdMain" Grid.Row="1" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand">
          <RowDefinition Height="*"/>
          <ColumnDefinition Width="*" />
        <ScrollView Orientation="Vertical" HorizontalOptions="Fill" VerticalOptions="Fill" Grid.Row="0" Grid.Column="0">
          <StackLayout x:Name="stkMain" Orientation="Vertical">
            <controls:ucTest x:Name="uc1" BindingContext="{Binding Blog}" />
And here is the code of the usercontrol:
<?xml version="1.0" encoding="utf-8" ?>
<StackLayout xmlns="http://xamarin.com/schemas/2014/forms"
                <Label x:Name="lbl1" VerticalOptions="Center" HorizontalOptions="Center" Text="HELLO WORLD" />
  <Button x:Name="btn1" Text="Tap for click count!" Clicked="OnButtonClicked" />
If you add 20 usercontrols to the stacklayout called “stkMain” from code behind, and run this app on an Android device (in my case a Galaxy S5), you will see that when you scroll the content of the scrollviewer upwards, its content fills all the all screen (including the 3 top buttons) instead of staying in its region.
Comment 1 James 2014-11-10 14:18:11 UTC
This behavior is not exhibited in Forms 1.0.6186 which comes default with the templates. When updating to 1.2.3 is when this issue appears.
Comment 2 James 2014-11-12 19:21:59 UTC
To better clarify, the Scrollview does not appear to be adhering to the appropriate bounding layouts since the update to Xamarin.Forms 1.2.3, and it appears is not resolved in the 1.3 technology preview.
Comment 3 Stephen Shaw 2014-12-02 12:41:19 UTC
Same thing as here? 
Comment 4 Stephen Shaw 2014-12-02 12:43:16 UTC
Here is a screenshot of this:
Comment 6 Stephen Shaw 2014-12-02 17:33:57 UTC
The problem is very easy to reproduce with the 'not working' solution from comment #5 with XAP Nexus 4 API 19.

API 16 doesn't really show this problem, but you can get some weird artifacts by clicking on the top three buttons and scrolling. Eventually you'll get some drawing artifacts.

Also, unrelated and potentially another bug... when you click (sometimes it takes more than once or twice) on the buttons the text becomes left justified instead of staying centered.
Comment 7 Parmendra Kumar 2014-12-17 07:48:54 UTC
I have checked this issue and I am able to reproduce this issue, To reproduce this issue I have followed sample in Comment #5. Please check the screencast and let we now If I have missed anything.

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

OutputLog: https://gist.github.com/Parmendrak/6338ea9cbd69a654c8b3
BuildLog: https://gist.github.com/Parmendrak/b88fb931fa34b6a296d4
IdeLog: https://gist.github.com/Parmendrak/7ecbb89f5c9a59e03d6b

Environment info:

Xamarin Studio 5.5.4 (build 15)
Xamarin.Android : (Business Edition)
Xcode 6.1 (6602)
Xamarin.iOS: (Business Edition)
Xamarin.Mac: (Business Edition)
Mac OS X 10.9.4
Comment 8 Rui Marinho 2015-01-09 13:18:27 UTC
This seems fixed in 1.3.0 final

here's an updated version