title: Android Webview - Detecting the header name as the user scrolls
body: <p>I have html files in this pattern.</p>
  
  <pre><code>&lt;a name="header1"&gt;&lt;/a&gt;
  &lt;h2&gt;First Heading&lt;/h2&gt;
  &lt;a&gt;Some Text goes here&lt;/a&gt;&lt;br/&gt;
  &lt;br/&gt;
  &lt;a name="header2"&gt;&lt;/a&gt;
  &lt;h2&gt;Second Heading&lt;/h2&gt;
  Some Text goes here&lt;br/&gt;
  &lt;br/&gt;
  </code></pre>
  
  <p>Which Looks like this :</p>
  
  <hr>
  
  <p></p>
  
  <h2>First Heading</h2>
  
  <p>Some Text goes here<br/>
  <br/>
  </p>
  
  <h2>Second Heading</h2>
  
  <p>Some Text goes here<br/>
  <br/></p>
  
  <hr>
  
  <p>In a <code>ListView</code>, I have the list of all the headers in the html file and based on which header the user selects, I bring the corresponding <em>header</em> to the top of the screen by doing   <code>view.loadUrl("javascript:window.location.hash='" + headerName + "'")</code> in the custom <code>WebViewClient</code>'s <code>onPageFinished</code> method and change the title of the screen in the titleBar to the <code>headerName</code>.</p>
  
  <p>Now my problem is : If a user selects <code>header1</code> in the <code>ListView</code> and scrolls down to <code>header2</code>, I need to know that the user is in the <code>header2</code> section so that the title of the screen could be changed. How can I know which part of the html file is being shown on the screen?</p>
  
  <p>Any help is appreciated.</p>