title: Prevent Flicker When Screen Loads and scrollTo a specific position
body: <p>Goal - I want to scrollTo(0,60) once a webview loads a webpage. At a minimum I want to prevent the flicker that I see when the webpage finishes loading. Flicker - As a webview loads a url (for example wiki) a user can scroll through it to read text. However the webview automatically scrolls to the top when it finishes loading. This does not happen on the standard browser. I am targeting API 8. (Old but people are still using that version).</p>
  
  <p>Here's some code:</p>
  
  <pre><code>private class WebBrowserWebViewClient extends WebViewClient 
  {   
      @Override
      public boolean shouldOverrideUrlLoading(WebView view, String url) 
      {
          Log.d(TAG, "Load URL");
          view.loadUrl(url);                                 
          return true;                
      }
  
      @Override
      public void onPageFinished(WebView view, String url) 
      {
          super.onPageFinished(view, url);
  
          Log.d(TAG, "Page Finished Loading");
  
          //Attempt scrollTo here does not work.
          view.scrollTo(0, 60);
      }            
  }
  </code></pre>
  
  <p>I also created a picture listener. </p>
  
  <pre><code>mWebView.setPictureListener(new PictureListener()
  {               
          @Override
          public void onNewPicture(WebView view, Picture picture) 
          {
              Log.d(TAG, "On New Picture called....Y is " + view.getScrollY());
  
                  //Does not work because it is called multiple times         
                  view.scrollTo(0, 60);
              }       
  });
  </code></pre>
  
  <p>I also keep on Progress</p>
  
  <pre><code>mWebView.setWebChromeClient(new WebChromeClient()
  {
         @Override
         public void onProgressChanged(WebView view, int newProgress) 
         {
              super.onProgressChanged(view, newProgress);
  
              Log.d(TAG,"On PRogress Changed. New Prgoress = " + newProgress);
         }
  });
  </code></pre>
  
  <p>So what I've noticed with the Log debug was that onPageFinished() is called before the webview is finished loading the URL. The onNewPicture() is called multiple times depending on the number of pictures in the URL and is called after the onPageFinsiehd() is called. The onProgressChanged() newProgress always gets to 100 then stops. After the onProgressChanged() reaches 100 and onNewPicture fires, the webview scrolls back to the top.</p>
  
  <p>Question - How to prevent the webview from scrolling back to the top?</p>
  
  <p><em>Note - I have seen other posts regarding similar issues but none of them resolved the issue.</em></p>