Skip to content Skip to sidebar Skip to footer

Stop When Webview Is At The End

I want to be able to scroll the webview until it has reached the end of the Webview. But the code below continues to scroll down automatically even when the webview page has reache

Solution 1:

Try this, (Basically using onPageFinished() instead of onNewPicture())

       wv.setWebViewClient(new WebViewClient() {            
        @Override
        public void onPageFinished(WebView view, String url) {
             // TODO Auto-generated method stub
            super.onPageFinished(view, url);
            Log.i(TAG,"onPageFinished invoked!!");
            wv.scrollBy(0, wv.getBottom());
            }

    }); 

Post a Comment for "Stop When Webview Is At The End"