Android Question EditText in landscape mode 'feature'

agraham

Expert
Licensed User
Longtime User
I've searched the forum for this and found nothing, but maybe I can't frame the search term properly!

In a couple of my apps, and some from the store as well, when an activity is in landscape mode tapping an EditText control replaces the EditText by some sort of input control that occupies the entire space above the keyboard with a 'Done' button to the right.

An Internet search indicates that adding this line to the manifest might stop this and show the EditText as it does when in portrait mode.
B4X:
AddManifestText(<edtSource android:imeOptions="flagNoExtractUi|flagNoFullscreen" />)
However this doesn't seem to work. Has anyone else experienced this and found a work around?

EDIT: Perhaps this doesn't work because the EditText is added by code rather than xml. I'll carry on looking for a possible solution using Reflection.
 
Last edited:

agraham

Expert
Licensed User
Longtime User
This works but seems to have side effect of altering the height of the Activity after rotating to landscape and back to portrait, but I haven't characterised exactly what happens yet.
B4X:
Dim jo As JavaObject
jo = edtSource
jo.RunMethod("setImeOptions", Array(33554432)) ' IME_FLAG_NO_FULLSCREEN
 
Last edited:
Upvote 0
Top