Android – Adjust scrollview when keyboard is up

androidandroid-keypadkeyboardscrollview

I have an activity with a form in it. Because the form is quite long, I've used a scrollview.

The problem is that the scrollview doesn't change when the keyboard is up. The keyboard overlaps the last part of the scrollview.

How can I make sure that the keyboard is below the scrollview and the scrollview is adjusted to fit the space above it?

In the meanwhile, is there a way to make sure the buttons ‘previous’ and ‘next’ are in the keyboard as well?

Best Answer

In the application's manifest file, add the following to the desired <activity /> --

 android:windowSoftInputMode="stateAlwaysHidden|adjustResize|adjustPan"