title: Android soft keyboard not panning web view
body: <p>The original problem I am fighting is more complex but for investigating purposes I have simplified the test case to the following:</p>
  
  <ul>
  <li>Single fullscreen activity</li>
  <li>Programmatically created web view that occupies roughly half of the horizontal screen space, 90% of the vertical space and is added to the root view via within the onCreate call:</li>
  </ul>
  
  <p><code>
  ViewGroup parent = (ViewGroup) getWindow().getDecorView().getRootView();
  parent.addView(myWebView);
  </code></p>
  
  <ul>
  <li>web view opens to google.com via:</li>
  </ul>
  
  <p><code>loadUrl("http://google.com")</code></p>
  
  <ul>
  <li>AndroidManifest.xml has the property:</li>
  </ul>
  
  <p><code>"android:windowSoftInputMode="adjustPan"</code></p>
  
  <p>When clicking on the search box on the google page the keyboard pops up but the web view itself is not shifted up as adjustPan indicates should happen.  The main activity also has a native text field that when clicked will shift the entire layout (including web view) up as expected.</p>
  
  <p>The behavior is present on 4.2.2 on both a Nexus 7 and Galaxy Nexus.</p>
  
  <p>So the question is how can I have the windowSoftInputMode property adjustPan be applied correctly to a web view instance so that when the soft keyboard is displayed the entire web view is shifted up by the vertical space taken up by the keyboard.</p>
  
  <p>Before I go down the road of trying to manipulate the layout manually within onMeasure I want to see if there is a consistent / better way to handle this.  The browser obviously handles this situation correctly so not sure why the web view is not able to handle this.</p>
  
  <p>One thing to note is that making the web view fullscreen or a separate activity are not possible options due to an existing architecture that I am not able to change.</p>