This is basically not your application error. Its IME design is designed. When the user enters landscape mode, he will occupy the entire screen.
You can install a third-party IME from the playback store and see how it works in portrait mode.
According to the link below in MCeley. You can do something below
@Override public InputConnection onCreateInputConnection(EditorInfo outAttrs) { outAttrs.imeOptions = EditorInfo.IME_FLAG_NO_EXTRACT_UI; }
or change your manifest for your activity below
android:imeOptions="flagNoExtractUi"
Read more here
source share