title: Android WebView not refreshed after webview content has been modified by JavaScript
body: <p>My application uses a <code>WebView</code> with transparent background in which some styling properties of the elements are modified by JavaScript.   </p>
  
  <p>The problem: <code>WebView</code> is not refreshed according to the modified properties. When <code>WebView</code> is redrawn (e.g., due to user orientation change) the <code>WebView</code> is updated correctly.
  I reproduced the problem on Android 3.2 (on Samsung GT) but on Android 2.1 and 4.3 all works fine.</p>
  
  <p>A sample code that reproduces the problem:<br>
  Obviously when the first image is tapped it should disappear, and tap on the second one should move it. If the background color of the <code>WebView</code> is changed to be opaque, or if I remove the image displayed below the <code>WebView</code> all works fine...</p>
  
  <p>HTML loaded by the web view. :  </p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
      &lt;body &gt;     
          &lt;img style="position:absolute;left:0px" onclick="this.style.display='none';" 
              src="http://flv.justad.tv/gallery/assets/trickplay/justad/tp-pause.png" /&gt;  
  
          &lt;img style="position:absolute;left:200px" onclick="this.style.top='200px';" 
              src="http://flv.justad.tv/gallery/assets/trickplay/justad/tp-ff.png" /&gt;
  
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Layout File:  </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      android:orientation="vertical"
      &gt;
  
       &lt;ImageView
                  android:layout_width="fill_parent"
                  android:layout_height="fill_parent"
                  android:scaleType="fitXY"
                  android:src="@drawable/display_background" /&gt;
  
      &lt;RelativeLayout android:layout_width="wrap_content" 
          android:layout_height="wrap_content"
          android:id="@+id/WebviewContainer"&gt;
  
      &lt;/RelativeLayout&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>Application <code>Activity</code>:  </p>
  
  <pre><code>    public class TestImageMoveActivity extends Activity {
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.main);
          RelativeLayout webviewContainer =        
                    (RelativeLayout)findViewById(R.id.WebviewContainer);
          WebView web = new WebView(this);
          web.getSettings().setJavaScriptEnabled(true);
          web.getSettings().setCacheMode(WebSettings.LOAD_NO_CACHE);
          web.setLayoutParams(
                  new LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.FILL_PARENT));
          web.setBackgroundColor(Color.TRANSPARENT);
  
          webviewContainer.addView(web);
  
          web.loadUrl("http://192.168.1.12/myWeb/localTmp/testImageMove.html");
      }
  }
  </code></pre>
  
  <p>Screen shot before tap:  </p>
  
  <p><a href="http://flv.justad.tv/gallery/resources/android_before_tap.jpg" rel="noreferrer">Screen shot before tap</a><br>
  <a href="http://flv.justad.tv/gallery/resources/android_after_tap.jpg" rel="noreferrer">Screen shot after tap on both images</a></p>