Question

I load a web page by using WebView in my app and there are EditText and Button at the bottom of the page. When I press the EditText, the soft input method will show, but the input method hides the EditText and Button.

I want the EditText and Button move to the top of the input method, so the input method won't hide them.

I added the android:windowSoftInputMode="adjustPan" to my activity tag in the AndroidManifest.xml, but it didn't work.

What else can I do?

Was it helpful?

Solution

Rather than using adjustPan property,Try using following property.It works fine for me..

        android:windowSoftInputMode="adjustResize"

OTHER TIPS

Try to put your webview in ScrollView layout. Once keyboad will appear the scroll layout will move upwards. Remember you can have only one child in ScrollView layout. Better put some Layout like Linear or Relative in Scrollview then add other child views in that layout.

Take a look at these:

Scrollview vertical and horizontal in android

http://www.androidaspect.com/2012/02/scrollview-tutorial-android-ui.html

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top