title: Layout in ScrollView is updated incorrectly when soft keyboard shows/hides
body: <p>I have a simple layout which consists of Entry and the Button. The goal is to place Button at the bottom and the Entry in the center of the remaining space. Everything works at start. Here are layout and screenshot.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
               xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
               NavigationPage.HasNavigationBar="False"
               x:Class="ParentAdda.Pages.Test"&gt;
      &lt;ScrollView x:Name="Qq" Orientation="Vertical" VerticalOptions="FillAndExpand" HorizontalOptions="FillAndExpand"&gt;
          &lt;StackLayout x:Name="Ww" Orientation="Vertical" VerticalOptions="FillAndExpand"
                       HorizontalOptions="FillAndExpand"&gt;
              &lt;BoxView VerticalOptions="FillAndExpand" HeightRequest="0" BackgroundColor="Aquamarine" /&gt;
              &lt;Entry
                  FontSize="Medium"
                  Placeholder="+111111111"
                  HorizontalOptions="FillAndExpand"
                  Keyboard="Telephone" /&gt;
              &lt;BoxView VerticalOptions="FillAndExpand" HeightRequest="0" BackgroundColor="Coral" /&gt;
              &lt;Button Text="Update" Clicked="Button_OnClicked"
                      HorizontalOptions="Fill"
                      BorderRadius="20"
                      BackgroundColor="Lime"
                      TextColor="White"
                      FontSize="Large"
                      FontAttributes="Bold" /&gt;
          &lt;/StackLayout&gt;
      &lt;/ScrollView&gt;
  &lt;/ContentPage&gt;
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/zFGfr.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/zFGfr.png" alt="enter image description here"></a></p>
  
  <p>I am also setting WindowSoftInputMode to resize in Android project (in the code, taking into account the bug in Xamarin.Forms when the tag is reset to Pan when set in manifest when using <code>FormsAppCompatActivity</code>)</p>
  
  <pre><code>    protected override void OnCreate(Bundle bundle)
      {
          base.OnCreate(bundle);
  
          Xamarin.Forms.Forms.Init(this, bundle);
          LoadApplication(new App());
  
          //https://bugzilla.xamarin.com/show_bug.cgi?id=39765
          App.Current.On&lt;Xamarin.Forms.PlatformConfiguration.Android&gt;().UseWindowSoftInputModeAdjust(WindowSoftInputModeAdjust.Resize);
          //https://bugzilla.xamarin.com/show_bug.cgi?id=39765
          //Remove the status bar underlay in API 21+
          if (Build.VERSION.SdkInt &gt;= BuildVersionCodes.Lollipop)
          {
              Window.DecorView.SystemUiVisibility = 0;
              var statusBarHeightInfo = typeof(FormsAppCompatActivity).GetField("_statusBarHeight", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic);
              statusBarHeightInfo?.SetValue(this, 0);
              Window.SetStatusBarColor(Android.Graphics.Color.Black);
          }
      }
  </code></pre>
  
  <p>When Entry gains focus, the page is not resized (though I can scroll to the very bottom when soft keyboard is visible)</p>
  
  <p><a href="https://i.stack.imgur.com/jrkr4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jrkr4.png" alt="enter image description here"></a></p>
  
  <p>When soft keyboard hides the content is resized incorrectly, and occupies just part of the screen.<a href="https://i.stack.imgur.com/0LMpd.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0LMpd.png" alt="enter image description here"></a></p>
  
  <p>It looks like the layout process is performed based on bounds before soft keyboard becomes visible/invisible. However, it seems that all <code>Bounds</code> properties (of the Page, ScrollView and StackLayout) as well as <code>ContentSize</code> property of ScrollView has correct numeric values (i traced them in button clicked handler). I tried to call <code>ForceLayout()</code> on different elements in same button clicked handler without luck.</p>
  
  <p>Does anyone know how to fix this issue?</p>