1

I have an interface layout (fragment) with a multi line TextEntry field at the bottom a few levels from the root container of the layout in a container with some buttons. When the text entry gets focus, I have it set to show the virtual keyboard and have it set to the "scroll window up" instead of the "resize" behavior so when the keyboard comes up the window is supposed to be "pushed up" above it.

My intention is to have the keyboard push up the window and leave the bottom of the window (same as bottom text entry widget) aligned with the top of the keyboard.

Instead, the behavior I get is the window is scrolled up such that the text baseline of where the cursor is (at touch that initiated focus) is scrolled to the top of the keyboard.

If I change the cursor position (touch or type) it re-scrolls the window to keep the cursor base line at the top of the keyboard.

This is not what I want - what I want for the bottom of the widget to be aligned with the keyboard and for for it to stay put at that alignment no matter where the cursor is inside the text entry widget.

I have found no references to this baseline seeking behavior in the docs so far and have found no references to how to control it.

I would like to be able to set an "alignment position" relative to the window's layout for here it should scroll the window to and simply specify it and have it work if I could.

Any hints - or even real answers?

demonplus
  • 5,613
  • 12
  • 49
  • 68
peterk
  • 5,136
  • 6
  • 33
  • 47
  • See - http://stackoverflow.com/questions/18316564/android-keyboard-slide-animation – ChrisF Mar 10 '16 at 11:31
  • Comments in it say "No you can't" :) But it is little stuff like on my samsung there is no margin between the baseline and the top of the keyboard so it looks real funky - My guess is it would be some sort of "fake out" workaround - like intercepting focus events in concert with detecting whether the keyboard is up or not. – peterk Mar 11 '16 at 13:06

0 Answers0