Skip to content Skip to sidebar Skip to footer

How To Prevent Lifting Listview When Keyboard Goes Up

This is code MainActivity java and main.xml

Solution 1:

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

The activity's main window is not resized to make room for the soft keyboard. Rather, the contents of the window are automatically panned so that the current focus is never obscured by the keyboard and users can always see what they are typing. This is generally less desirable than resizing, because the user may need to close the soft keyboard to get at and interact with obscured parts of the window.

If this option does not fit your needs, you can allways check Android documention about soft input mode

Solution 2:

I'm using android:windowSoftInputMode="stateVisible|adjustNothing" , but this only for API higher 10(unfortunately).

Update: After adding to listview this attributes:

android:focusableInTouchMode="false"android:isScrollContainer="false"

I'm completely solved my problem.

Post a Comment for "How To Prevent Lifting Listview When Keyboard Goes Up"