showSoftwareKeyboard unsets fullscreen and alters the layout

75 Views Asked by At

When I click a TextInput field, the software keyboard shows up, but it seems like it tries to compress the entire layout in the remaining space above the keyboard. All elements with relative size ends up smaller. Are there any general guidelines for solving this problem?

2

There are 2 best solutions below

1
On

You need to add android:windowSoftInputMode="adjustPan" in the AndroidManifest.xml file, inside the application tag.

0
On

To fix it you should use LinearLayout. Because Relative depends of other elements.