title: Hiding ActionBar during scrolling
body: <p>I want to hide my ActionBar (Sherlock) if the user scrolls in the webView (which is the only content of the layout). When scrolling to the top or bottom, it should appear again. I saw this in many (german) newspaper Apps (e.g. Spiegel Online). </p>
  
  <p>I implemented the <code>ObservableWebView</code>, seeing <a href="https://stackoverflow.com/a/14753235/2186109">in this post</a>.
  Then I implemented the <code>onScroll</code> function, which should hide and show the ActionBar:</p>
  
  <pre><code>    webView.setOnScrollChangedCallback(new OnScrollChangedCallback()
      {
          @Override
          public void onScroll(int l, int t)
          {
              if (t &lt;= 0 &amp;&amp; !activity.getSupportActionBar().isShowing())
              {
                  activity.getSupportActionBar().show();
              }
              else if ((webView.getContentHeight()) &gt;= (webView.getHeight() + t) &amp;&amp; !activity.getSupportActionBar().isShowing())
              {
                  activity.getSupportActionBar().show();
              }
              else if (activity.getSupportActionBar().isShowing())
              {
                  activity.getSupportActionBar().hide();
              }
          }
      });
  </code></pre>
  
  <p>But it seems, the ActionBar is fluttering when I scroll to the top or to the bottom. Maybe I should calculate with the height of the ActionBart itself too? Or maybe theres another (simpler) way??</p>
  
  <p>For notice: mind SDK: 10, target SDK: 17</p>