1

When WebView is hardware accelerated, clicking on input field causes keyboard to appear and html is redrawed shifted and duplicated for a moment:

1) When soft keyboard is appearing WebView pans its content to bottom-left, then againt to normal position. Causes short view-able duplication.

2) When changing keyboards (ex. abc->numbers) contents are panned down by keyboard height and then back to normal position. Causes short view-able duplication.

Tested on two Android 4.0 tablets, if hardware accelerations is turned off no such glitches appear.

I failed to found any information on this, has anyone experienced same problem?

lietus
  • 199
  • 2
  • 11

1 Answers1

2

So I finally found some solutions:

  1. The entire WebView content moves by layout margin width, so setting it to 0px fixes this problem.

  2. android:windowSoftInputMode="adjustPan" for WebView activity.

Sam
  • 86,580
  • 20
  • 181
  • 179
lietus
  • 199
  • 2
  • 11
  • I think I'm experiencing similar problem, where everything in webview seems to shift a few pixels to the right (and stays there) when I go to input field. when you say layout margin - do you mean the outer parent (html/body/#wrapper)? – Nisk Mar 27 '13 at 08:56