Bug 43952 - Android keyboard overlaps Editor control when HeightRequest is set. Android focuses on text cursor rather than entire control.
Summary: Android keyboard overlaps Editor control when HeightRequest is set. Android f...
Alias: None
Product: Forms
Classification: Xamarin
Component: Android ()
Version: 2.3.1
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2016-09-01 19:25 UTC by Ammar Mheir
Modified: 2016-09-02 16:40 UTC (History)
6 users (show)

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

Test Case (800.21 KB, application/x-zip-compressed)
2016-09-01 19:25 UTC, Ammar Mheir

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 for Bug 43952 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:

Description Ammar Mheir 2016-09-01 19:25:02 UTC
Created attachment 17299 [details]
Test Case

## Overview

Android keyboard will overlap part of the Entry or Editor control when the HeightRequest property is set in Xamarin.Forms. Android will focus on text cursor rather than the entire control. Pressing enter a couple of times will scroll control to be completely visible. 

## Steps to reproduce 

1. Open Visual Studio 2015 and create a new Blank Xaml App (Xamarin.Forms Portable)
2. Open MainPage.xaml and add an Entry or Editor control with HeightRequest and VerticleOptions properties. (<Editor HeightRequest=”80” VerticleOptions=”End”/>)
3. Build and Deploy to Android
4. Click on the Editor to start typing 
5. Notice how Android will focus onto text cursor rather than the Entry or Editor, cutting out a little of the control. 
6. Press the return key to go to a new line about 2-3 times. This will scroll the Editor control up above the keyboard revealing the entire control. 
7. Pressing backspace to delete those new lines will still keep the entire control in focus

## Expected Results

Android keyboard will scroll so that the control (Editor or Entry) is in focus, revealing the entire control even if the height request was set, rather than focusing on the text cursor cutting off half of the Editor or Entry control.

## Actual Results

The Android keyboard will reveal and only scroll the UI so that the text cursor is visible and in focus rather than scrolling to have the entire Editor or Entry control in view. This occurs when the HeightRequest is set on these controls. When there is no height request property set, the Editor or Entry is a single line and will focus correctly on the control. However, when increasing the HeightRequest, the Android keyboard does not seem recognize the additional height to the control and will focus on the text cursor on the first line of the Editor rather than having the entire control visible.

##  Version Information

Microsoft Visual Studio Enterprise 2015
Version 14.0.25425.01 Update 3
Microsoft .NET Framework
Version 4.6.01586


Xamarin (fcbe082)
Xamarin.Android (1cf254d)

## Additional Information

Attached a sample case with single Editor control if you’d like to download a quick test case. This issue doesn’t seem to be appearing on the other platforms (iOS & UWP).