Why does the soft keyboard change the layout so dramatically when I swap this screen to landscape? It works perfectly fine in portrait. I am assuming that it has to do with the limited space, but the keyboard could still open without covering the EditText that spawned it. It even inserts a Search button. Is there a way to prevent this from happening?

enter image description here

enter image description here

有帮助吗?

解决方案

This is default Android behavior, users should be used to it. But if you really don't want this to happen, you can put android:imeOptions="flagNoExtractUi" in the EditText layout.

Also, the "Search" button is what you've specified in the android:imeOptions for the action.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top