Adjust scrollview when keyboard is up

dumazy picture dumazy · Sep 14, 2012 · Viewed 17.2k times · Source

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?

Answer

Prashant Mishra picture Prashant Mishra · Sep 14, 2012

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

 android:windowSoftInputMode="stateAlwaysHidden|adjustResize|adjustPan"