Detecting end of page during scrolling in WebView
<p>first I would like to say that I have searched for my problem everywhere, but solutions I have found were not satisfactory. Secondly I'm quite new to Android SDK so please be patient :). </p>

<p>And here is my question: How I can detect if scrolling in WebView has been ended and reach edge of page (Y axis)? </p>

<p>So far I figure that:</p>

<ul>
<li><p>I can add onTouchListener and there check if event is move and with sophisticated formula check if I reach edge - however this works only if someone is touching screen</p></li>
<li><p>My second idea show following code:
<code>@Override
protected void onScrollChanged(int l, int t, int oldl, int oldt) {
    super.onScrollChanged(l, t, oldl, oldt);
    if(panel==null) return;
        int offset = (int) (OFFSET*(getScale()));
        if(getScrollY()+offset &gt;= getScale()*(getContentHeight() - getHeight()) || t-offset&lt;= 0){               panel.setVisible();
        }else{
            panel.setInvisible();
        }
}</code></p></li>
</ul>

<p>I extend WebView and Override method onScrollChaged. This works better than previous idea however it works only sometimes. </p>

<p>If anybody can help me with that issue I will be very gratefull.  </p>
