I just imported the sdk softkeyboard in eclipse (sample code from API version 16, but tried earlier versions too) and installed it on my devices (Galaxy Note 10.1, Galaxy S2, and Galaxy Nexus).
After some testing I noticed a strange behavior: When I hit a key on the very top the keyboard will show me the suggestion of the letter which is above the letter I really pressed.
For my current study I need to implement a softkeyboard and add some features. But for these features I need an accurate keyboard.
Can you confirm the behavior and give me any suggestions how to fix?
Thank you very much in advance.
After hours of searching I finally found a solution for my problem.
The android sample keyboard uses the
KeyboardViewStylewhich inherit fromKeyboardViewIn the android source I found the definition of
Widget.KeyboardViewThere I noticed following line:
To solve my problem I defined my own style which inherit from
Widget.KeyboardViewand overwroteandroid:verticalCorrectionthe following way:In the end I applied the style to my keyboard.
et voilà 🙂