I want to develop a replacement keyboard, but I am afraid that Android assumes the general keyboard ‘area’ will be a single rectangular shape that sits at the bottom of the screen.
What if I want my keyboard to consist of multiple shapes that don’t just sit at the bottom of the screen? Am I doomed from the start, or is it possible to do what I want to do?
On a related note, what if I only want my keyboard to appear when the phone is in a certain orientation but when the phone is held at a different orientation, the normal soft keyboard is used? Again, out of luck or possible?
cheers!
The IME is just a window. It is positioned relative to the bottom of the screen, so you can’t really control that. But you can draw whatever you want in it, or not for places you want to be transparent. You can control how much applications move up away from your IME with this: http://developer.android.com/reference/android/inputmethodservice/InputMethodService.html#onComputeInsets(android.inputmethodservice.InputMethodService.Insets)
Android doesn’t let windows decide one at a time whether events will be handled by them or dispatched to the window behind them; the only control you have to keep events from being consumed by your entire window is the Insets.touchableInsets constants to tell the window manager to allow events outside of the given insets to go through to what is behind it.