Bug 41576 - Incorrect position of Android Custom Keyboard using Xamarin.Forms. Keyboard stuck on top-left of screen.
Summary: Incorrect position of Android Custom Keyboard using Xamarin.Forms. Keyboard s...
Status: CONFIRMED
Alias: None
Product: Forms
Classification: Xamarin
Component: Android ()
Version: 2.3.3
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2016-06-07 22:53 UTC by Ammar Mheir
Modified: 2017-07-12 22:44 UTC (History)
9 users (show)

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


Attachments
Test Case (7.11 MB, application/x-zip-compressed)
2016-06-07 22:53 UTC, Ammar Mheir
Details


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 41576 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:
Status:
CONFIRMED

Description Ammar Mheir 2016-06-07 22:53:36 UTC
Created attachment 16222 [details]
Test Case

## Versions Tested

Xamarin.Android 6.1.0.69 (5263594)
Xamarin.Android 6.0.4.0 (ee215fc)
Xamarin.Forms 1.5.1.6471, Xamarin.Forms 2.1.0.6529, Xamarin.Forms 2.2.0.45


## Steps to reproduce

1.Open the `.sln` file from the attached test case in Visual Studio.
2.Clean and Build Solution
3.Deploy App (to any Android device or emulator)
4.Click on the only Numeric Entry Field


## Expected Results

Keyboard appears in default position on bottom of screen and has expected keyboard behavior, stretching to fit width even if device is rotated.


## Actual Results

Custom Numeric keyboard appear stuck on top-left corner of page rather than in default location. Also can be observed when rotating device, keyboard does not re-size and remains on top-left corner.


## Version information

Microsoft Visual Studio Enterprise 2015
Version 14.0.25123.00 Update 2
Microsoft .NET Framework
Version 4.6.01038

Xamarin   4.1.0.517 (2a984fb)
Xamarin.Android   6.1.0.69 (5263594)
Xamarin.Forms 2.2.0.45


## Additional Information

Issue was also reported by other users here: https://forums.xamarin.com/discussion/45171/custom-keyboard-with-xamarin-forms-all-working-except-position-of-keyboard
Custom Keyboard solution was made from the following Android sample and modified to use Xamarin.Forms: https://github.com/Vaikesh/CustomKeyboard/tree/master/CustomKeyboard
Comment 1 Chris King 2017-01-06 22:11:33 UTC
I'm actually seeing an InvalidCastException in the property setter here: 

   OnKeyboardActionListener = new MyOnKeyboardActionListener(this, mainActivity);

This also appears to be a issue that needs investigation.
Comment 2 Jimmy [MSFT] 2017-03-07 22:35:55 UTC
I am able to reproduce the issue with the attached project by commenting out line 30 inside CustomKeyboardView.cs to avoid the issue mentioned in comment 1. 

When the custom keyboard is displayed it is anchored to the top left of the screen. It's not clear though whether this is an issue with the Forms source or an implementation issue with the custom keyboard not having correct coordinates to layout the view. Still, I am confirming this report for now so the engineering team can investigate further.

### Version tests
Forms 2.2.0.45      BAD
Forms 2.3.4-pre2    BAD