Bug 36574 - With AbsoluteLayout as root and ScrollView as intermediate root, keyboard doesn't auto-scroll to show Entry
Summary: With AbsoluteLayout as root and ScrollView as intermediate root, keyboard doe...
Status: RESOLVED FIXED
Alias: None
Product: Forms
Classification: Xamarin
Component: Android ()
Version: 2.0.0
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-12-04 02:52 UTC by andrew
Modified: 2016-12-30 08:50 UTC (History)
3 users (show)

Tags: ac
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:
Status:
RESOLVED FIXED

Description andrew 2015-12-04 02:52:20 UTC
When the keyboard shows on Android (iOS is OK), it sometimes overlaps and hides the focused Entry.  This happens even if there's a ScrollView ancestor, specifically in cases when an AbsoluteLayout is the root layout.

This issue is described here:
https://forums.xamarin.com/discussion/30234/android-scrollview-and-keyboard-not-working-correctly-with-absolute-layout-as-root

The original poster on that thread confirmed the bug was present in 1.3.0, and I can confirm it's still present in 2.0.0.6490.
Comment 1 andrew 2015-12-04 02:53:53 UTC
Copied from the forum thread for the record:

---------------------------

OK I have a special hierarchy in my project and stacks and need the keyboard to activate the scroll view correctly however in Android there seems to be a bug because the same code on the iOS side is working correctly... Here is the layout I have...

(NOT WORKING)
ContentPage
--- AbsoluteLayout
----- StackLayout (this is my custom header)
----- StackLayout (this is my custom sidenav)
----- StackLayout (this is my custom content area)
------- ScrollView
--------- StackLayout
----------- Entry (input)
----------- ...... more inputs

Activating an Entry box will bring up the keyboard but will not scroll the scrollview to the correct location so the keyboard does not block the input... I don't want to be using the traditional layout of a current navigation layout and navigation bar because it very limiting in the type of layout I am trying to make...

The above layout and code works perfectly on iOS but not on Android... When the keyboard pops up it does NOT scroll the view correctly... However the below layout does work on Android but it does not let me build the type of layout that I want...

(WORKING)
- ContentPage
--- StackLayout
----- StackLayout (this is my custom header)
----- StackLayout (this is my custom content area)
------- ScrollView
--------- StackLayout
----------- Entry (input)
----------- ...... more inputs

Any ideas? or maybe I wait for Forms 1.3.2 ???

I need to have an AbsoluteLayout on the very top so I can position all my layout element accordingly... (nav bar, side nav, satellite buttons, etc...) It is just not achievable using a StackLayout on the Root... Unless someone knows how...
Comment 3 Samantha Houts [MSFT] 2016-04-13 21:58:39 UTC
Thank you for taking the time to submit this report. After reviewing the description of this bug, we believe it no longer affects the current version of Xamarin.Forms. If you are still experiencing the issue after updating your packages, please reopen this report with an attached reproduction.
 
For your convenience, we have created some reproduction best practices viewable here: https://gist.github.com/jassmith/92405c300e54a01dcc6d

Warm regards,
Xamarin Forms Team
Comment 4 François M 2016-12-30 08:50:18 UTC
Issue is still there with XF 2.3.127.
I have an editor in the bottom of a scrollview.
If I make the scrollview the content of the page, then tapping the editor shows the keyboard and the entry is scrolled on top of the keyboard.
If I add the scrollview within an absolutelayout that I make the content of the page, then no scroll (even by touch btw).