Mine is a native application in which I want to show / hide the button if the user scrolls to the end of the webview. I looked at the answer here and got the whole idea of registering a callback through the interface. My main problem is that I cannot get my calculations right inside the onScrollChanged method. I tried combining things like getHeight (), getContentHeight (), top, etc., but it looks like it's too early. I tried with a simple page like google with relatively less content as well as a news page.
These logics work just fine for a normal scroll view. Since the web page contains a lot of content, this can lead to calculation errors. Insert example code: does not work.
@Override protected void onScrollChanged(int left, int top, int oldLeft, int oldTop) { if ( mOnWebViewBottomReachedListener != null ) {
Need help with this. Thanks.
android webview
Rajat sharma
source share