Is it possible to change programmatically the position of the keyboard? I'm developing an app for a totem, and if the keyboard appears docked on the bottom, it's very difficult to use.
I tried to create a custom keyboard extending the InputMethodService, and i'm able to change the layout of the keys, but i'm not able to change the keyboard's view position.
SwiftKey allows to undock the keyboard and to drag it vertically, how can they do that?
Inside InputMethodService, you have reference to a Window. Add your dragging logic to update LayoutParams for the window. Make sure you implement onComputeInset properly. On a note that the gravity of window is always CENTER horizontally and BOTTOM vertically even though you try to use a new LayoutParams for the window.
Check out my sample https://github.com/dbof10/float-keyboard

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With