When an activity sets FLAG_FULLSCREEN on its window, Android assumes
that the window size will always be the same as the screen size. This
causes the window to scroll instead of resizing when the soft keyboard
comes up, which (according to a quick Google search) isn't the behavior
most developers are expecting.
This patch implements an ugly workaround: extend the root element of the
layout (in our case, a LinearLayout) to hook into the onMeasure()
callback, which is called when the window size changes, so that we can
resize ourselves when the window size changes.
(1) Let full-screen IMEs wrap the text into multiple lines instead of
making the text scroll off the screen.
(2) Provide a preference to let the user choose whether or not to enable
autocorrection of typed text.
(3) Provide a preference to let the user choose whether or not to enable
autocapitalization of sentences. Note that even when this is enabled,
autocapitalization will only happen if the option is also enabled in the
IME.
(4) In landscape mode only, don't replace the Enter key with a Send
button, to make it harder to accidentally send a message. (We can't do
this in portrait, because we would be left without any send button at
all -- perhaps the input line should be changed to be similar to the
text message application, which has a send button next to the input
line?)